After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 700419 - Trigger toggle maximize on double click in menubar/menushell
Trigger toggle maximize on double click in menubar/menushell
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
3.8.x
Other Linux
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on: 701144
Blocks:
 
 
Reported: 2013-05-15 21:50 UTC by Lionel Landwerlin
Modified: 2013-11-09 19:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
menushell: implement toggle maximize on double click (1.85 KB, patch)
2013-05-15 21:51 UTC, Lionel Landwerlin
needs-work Details | Review
menushell/toolbar/window: implement toggle maximize on double click (6.08 KB, patch)
2013-07-25 14:01 UTC, Lionel Landwerlin
none Details | Review
menushell/toolbar/window: implement toggle maximize on double click (4.94 KB, patch)
2013-10-08 13:25 UTC, manuel.BACHMANN@eurogiciel.fr
none Details | Review

Description Lionel Landwerlin 2013-05-15 21:50:53 UTC
While testing some Gnome apps in maximized mode, I had a couple of people telling me that once Totem (for example) is maximized by double clicking the top window decoration of the window, they are confused about how to switch back to unmaximized mode. Mostly because there is no way to double click somewhere else to 'invert' the maximize behvaior. It's only possible to drag the window away for the top of the screen.

Here is a patch to add maximize toggle support to the menubar/menushell so in addition to the drag behavior they already, they also support double click to toggle the maximized state.
Comment 1 Lionel Landwerlin 2013-05-15 21:51:53 UTC
Created attachment 244361 [details] [review]
menushell: implement toggle maximize on double click
Comment 2 Lionel Landwerlin 2013-05-15 21:56:32 UTC
Added Allan who was receptive to the idea on IRC.
Comment 3 Matthias Clasen 2013-05-17 03:00:40 UTC
Review of attachment 244361 [details] [review]:

I think that is _somewhat_ dubious - the style property controlling this is called ::window-dragging and is documented to control just that. At the very least, we should update the documentation of the style property to mention this new feature.

Also, it might be nice to refactor this and have an internal gtk_window function to do this button event handling, rather than maintaining 3 identical copies (in gtkmenushell, gtktoolbar and gtkwindow).
Comment 4 Lionel Landwerlin 2013-05-17 07:48:30 UTC
Fair enough. Just one question, where is the code in GtkWindow dealing with window dragging? All I see are help functions, no code actually dealing with press event etc...
Comment 6 Lionel Landwerlin 2013-07-25 14:01:05 UTC
Created attachment 250119 [details] [review]
menushell/toolbar/window: implement toggle maximize on double click
Comment 7 manuel.BACHMANN@eurogiciel.fr 2013-10-08 13:14:41 UTC
(In reply to comment #6)
> Created an attachment (id=250119) [details] [review]
> menushell/toolbar/window: implement toggle maximize on double click

I can confirm this works as expected ; double-click works, and setting :

.menubar {
 -GtkWidget-window-dragging: false;
}

in the theme "gtk.css" disables both drag-away and double-click.
Comment 8 manuel.BACHMANN@eurogiciel.fr 2013-10-08 13:25:08 UTC
Created attachment 256736 [details] [review]
menushell/toolbar/window: implement toggle maximize on double click

Slightly the same code, but updated for latest git (new line numbers).