Page 1 of 1

move windows dragging the menubar (gtk)

Posted: 16. Jan 2014, 00:16
by marin
It's nice to be able to move gtk windows not only by dragging the titlebar but also the menubar (its unpopulated part).

It is done with a patch to gtk+2.0 that requires no additional dependencies as the ability is already built into the libgtk,
it just needs to be enabled for menubar widget.

The patch is a tad less than 300 lines over four .c files.

Main patch:
https://git.gnome.org/browse/gtk+/commi ... 470c79d451

with a later one line correction of:
https://git.gnome.org/browse/gtk+/commi ... 6586d3f51f


Fedora, SuSE and Ubuntu apply it, Vector doesn't.

sample patch for Ubuntu:
https://bazaar.launchpad.net/~ubuntu-br ... ubar.patch

same for SuSE:
http://lists.opensuse.org/opensuse-comm ... 01513.html

Arch imported it from:
https://bug611313.bugzilla-attachments. ... ?id=155231

Some considerate gtk and WM themes accent/suggest this ability by making titlebar and menubar seamless in appearance (giving them the same color/gradient).

Re: move windows dragging the menubar (gtk)

Posted: 16. Jan 2014, 13:06
by gapan
Well... no.

If it's that simple, then why the gtk devs have not included it already? There must be a reason. I haven't tried it, but one question that comes up, is what happens with detachable toolbars then? And anyway, gtk+2 is a slackware package and we won't touch it unless we really really really have to (same with any other slackware package).

Individual users are allowed to do anything they want with their own installation though. ;)

Re: move windows dragging the menubar (gtk)

Posted: 24. Jan 2014, 01:58
by marin
If it was was so easy I would have done it already :)

I intonated my suggestion optimistcally hoping etc...
Anyway if I get any results I'll report. No Slackware based distros did it though.
Detaching toolbar would be lost as I understood the code (though and I never had a need to detach a toolbar).

Re: move windows dragging the menubar (gtk)

Posted: 21. Feb 2014, 02:32
by marin
I tried the patches and used the commands from slackbuild file as much as I could. I have never properly used the slackbuild system so that was certainly bad to start with.

The desired dragging by menubar works. On pekwm it's jerky (but, larger the window, smoother it moves), better on openbox and smooth on xfce. Exactly the same as on PCLOS (suse, fedora and ubuntu made it work well in all wms, ie pekwm, flux/openbox, xfce. kde, gnome).

Additionally, aurora and murrine engines are now not used by new libgtk, probably beacause I didn't use the slackbuild script.

The complexity of it all just reared its head.

I did back up:
libgtk-x11-2.0.so.0.2400.10
libgtk-x11-2.0.la
libgdk-x11-2.0.so.0.2400.10
libgdk-x11-2.0.la
libgailutil.so.18.0.1
libgailutil.la
and have successfully restored the previous state but I'm keeping the hack even if it's half-baked.

Re: move windows dragging the menubar (gtk)

Posted: 21. Feb 2014, 09:48
by mimosa
This looks like a good example of the sort of thing that's more trouble than it's worth. The difference between say Ubuntu and Slackware (why the latter is more stable) is the tendency, or not, to add bells and whistles in proportion to their usefulness. When this is implemented in a stable way upstream it will no doubt trickle down to us (it will just be the default behaviour). Till then it is left as an exercise for the curious user with time to spare.