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 701610 - GTK2 Adwaita engine does not allow dragging windows by menu bar or toolbar
GTK2 Adwaita engine does not allow dragging windows by menu bar or toolbar
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: .General
2.24.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-06-04 23:23 UTC by Josh Triplett
Modified: 2018-05-02 15:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Josh Triplett 2013-06-04 23:23:59 UTC
The new GTK2 Adwaita engine looks quite good, and helps GTK2 apps fit in on a GNOME 3 desktop.  However, I noticed that while it follows the GTK3 style where the menu bar blends into the title bar, it does not behave the same as that style: you can only grab and drag the window by the title bar, not by the menu bar or toolbar.

Now that both GTK2 and GTK3 apps look the same, the difference in UX behavior becomes more of a problem.
Comment 1 Andreas Nilsson 2013-08-15 12:43:53 UTC
I think this might be a limitation in GTK2 itself and outside the control of the theme.
Comment 2 Adolfo Jayme 2013-12-15 00:17:22 UTC
Other GTK2 themes allow for menubar dragging, but that functionality depends on the theme engine IIRC.
Comment 3 Jack Gandy 2014-11-15 04:35:42 UTC
The GTK 2 version of Adwaita has, since 3.6, included the ability to drag the menubar and toolbar. You can see this in the beginning of the gtkrc with GtkMenuBar::window-dragging and GtkToolbar::window-dragging both set to 1.

This is, in fact, a shortcoming in the vanilla GTK 2 library, as it doesn't support this feature. Many mainstream distros such as Fedora and Ubuntu distribute a patched version of GTK 2 that makes full use of this. If dragging doesn't work with Adwaita, then it wouldn't be working in any other themes, either.
Comment 4 Josh Triplett 2014-11-15 05:05:01 UTC
(In reply to comment #3)
> The GTK 2 version of Adwaita has, since 3.6, included the ability to drag the
> menubar and toolbar. You can see this in the beginning of the gtkrc with
> GtkMenuBar::window-dragging and GtkToolbar::window-dragging both set to 1.
> 
> This is, in fact, a shortcoming in the vanilla GTK 2 library, as it doesn't
> support this feature. Many mainstream distros such as Fedora and Ubuntu
> distribute a patched version of GTK 2 that makes full use of this. If dragging
> doesn't work with Adwaita, then it wouldn't be working in any other themes,
> either.

Interesting.  Any chance of that patch getting into upstream?
Comment 5 Jack Gandy 2014-11-15 05:17:13 UTC
I'll look into it, although you should know that GTK 2 is only being maintained at the moment- no new features. However, the diffs for the patches I've seen are fairly small, just 30 lines or so, so I don't imagine it would be too painstaking to get in.

In fact, I should find out if there's already a bug open for it.
Comment 6 Christian Stadelmann 2015-11-28 14:13:55 UTC
I think this issue is fixed. At least I can drag windows by mouse on header bar, menu bar and tool bar on gnome 3.18.x
Comment 7 Josh Triplett 2015-11-29 02:18:31 UTC
(In reply to Christian Stadelmann from comment #6)
> I think this issue is fixed. At least I can drag windows by mouse on header
> bar, menu bar and tool bar on gnome 3.18.x

With stock upstream GTK, or a distribution-patched version as mentioned in comment 3?
Comment 8 Josh Triplett 2015-11-29 02:21:15 UTC
I just retested with GTK+ 2.24.28 and four different GTK+2 applications (gimp, celestia, higan, and firefox), none of which allowed dragging by the menu bar.
Comment 9 Christian Stadelmann 2015-11-29 11:16:30 UTC
With adwaita-gtk2-theme package version 3.18.0-1.fc23 from Fedora. See https://pkgs.fedoraproject.org/cgit/gnome-themes-standard.git/tree/?h=f23 for the spec file. Only change is the gtkrc file with these contents:

gtk-theme-name = "Adwaita"
gtk-icon-theme-name = "gnome"
gtk-cursor-theme-name = "Adwaita"
gtk-button-images = 0
gtk-menu-images = 0

Otherwise they are just packaging the .tar.xz file from http://download.gnome.org/sources/gnome-themes-standard/3.18/, so I'd call it stock upstream.

But they patch their gtk2 (2.24.28) version with a file called "window-dragging.patch", see https://pkgs.fedoraproject.org/cgit/gtk2.git/tree/?h=f23

So this issue is not fixed in stock gtk2, sorry. But at least there is a working patch lying around.
Comment 10 Juraj Fiala 2016-01-02 16:54:29 UTC
Is there any reason for the patch not to be merged when it's used by major stable distributions?
Comment 11 Juraj Fiala 2016-03-04 06:58:28 UTC
OK this is now obselete, the theme no longer allows this and neither does the gtk3 version.
Comment 12 Josh Triplett 2016-06-26 20:10:41 UTC
(In reply to Juraj Fiala from comment #11)
> OK this is now obselete, the theme no longer allows this and neither does
> the gtk3 version.

When did this stop working in gtk3?
Comment 13 Juraj Fiala 2016-06-26 20:13:19 UTC
(In reply to Josh Triplett from comment #12)
> (In reply to Juraj Fiala from comment #11)
> > OK this is now obselete, the theme no longer allows this and neither does
> > the gtk3 version.
> 
> When did this stop working in gtk3?

I don't remember it working to be frank, it definitely does not in 3.20, but I just heard today (after marking this) that it's a regression.
Comment 14 Josh Triplett 2016-06-26 20:38:09 UTC
I can confirm the regression as of GTK+ 3.20.6.  (Easy test case: gnome-terminal with "Show Menubar" enabled.)  It definitely worked in gnome-terminal before.

> I just heard today (after marking this) that it's a regression.

Do you have a bug number for that?  And is this a regression in GTK3 or in the Adwaita theme?

Either way, this should be reopened.
Comment 15 Juraj Fiala 2016-06-26 20:43:43 UTC
Yeah, you're right. I don't have a bug number, but I'll try asking around.
Comment 16 Juraj Fiala 2016-10-09 08:30:46 UTC
OK I added this back to the theme but this is a gtk2 issue.
Comment 17 Matthias Clasen 2018-02-10 05:26:56 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 18 Christian Stadelmann 2018-02-10 09:53:38 UTC
This issue is still present on Gtk+ 2 applications.
Comment 19 GNOME Infrastructure Team 2018-05-02 15:40:26 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/426.