PDA

View Full Version : [PATCH] gtk-window-decorator: use metacity's button_layout


crankyjack
December 10th, 2006, 03:12 PM
I patched gtk-window-decorator to make it aware of metacity's button_layout option. It comes handy if you prefer non-standard layout of window title bar buttons. Most of the patch consists of very slightly modified code of three functions from metacity's src/prefs.c. The patch for 0.3.4 (tested with gandalfn's ubuntu version) is at http://ii.fmph.uniba.sk/~kluka/compiz/gwd-button_layout-0.3.4.diff.

I tried patching the current git version (http://gitweb.freedesktop.org/?p=xorg/app/compiz.git;a=commit;h=c73a8862f3f964efe0395a703f5d af0cf9888c43), but the patch (http://ii.fmph.uniba.sk/~kluka/compiz/gwd-button_layout-git.txt) makes gwd draw title bar with just the background. No title and no buttons are visible, although the invisible buttons react to clicks and show tooltips at correct places. Suggestions are welcome. Current git version of gwd seems broken anyway: only the upper half of the left and the right parts of the window border and shadow is painted.

—Jan

lowfi
January 13th, 2007, 03:25 PM
Hi,

i modified your patch to work with the latest git version and managed to fix the action_menu
position issue, but there are still some bugs left.

they are described here:
http://lists.freedesktop.org/archives/compiz/2007-January/001249.html

i also removed the layout comparison function and added an update callback.
i think this integrates better with the other options and dosen't check the
the theme keys everytime the layout changes.

Patch: http://www.unet.univie.ac.at/~a0247905/gwd-button_layout.diff

crankyjack
January 14th, 2007, 01:26 PM
Wow, thanks for the effort. I'm afraid, I can't help you, but I'll check the patch when I'm at my compiz-capable computer. Thanks & good luck.
—Jan

malwk-
March 30th, 2007, 10:53 PM
I recently (yesterday) switched to compiz from beryl and I was wondering if it is possible to use alternative layout for the buttons on the title bar. I posted a new topic on this and FunkyM pointed me to this thread, but it seems dead.

Is there any chance for this to be solved on compiz 0.3.6 and greater?

thanks

bijoux
April 3rd, 2007, 01:23 AM
Hey,
This issue was recently brought up in the Compiz ML.
http://lists.freedesktop.org/archives/compiz/2007-April/001803.html
and download the patches.

miatawnt2b
June 25th, 2007, 08:19 PM
Do I apply these three patches in order to the 0.5.0 source and re-compile?
-J

FunkyM
June 25th, 2007, 11:06 PM
Do I apply these three patches in order to the 0.5.0 source and re-compile?
-J

You don't have to. It's upstream (thus included) in that compiz version.

miatawnt2b
June 26th, 2007, 12:30 PM
hummmm... if I di a compiz -- version it says 0.5.0, but yet it isn't using my metacity button placment settings which are set in gconf editor.

thoughts?

-J

lowfi
June 26th, 2007, 01:39 PM
it was added a few days after the release of 0.5.0. You'll have to use the current git version or some newer packages.

miatawnt2b
June 26th, 2007, 02:31 PM
Sounds good. I have the following in my /etc/apt/sources.list

#Compiz
deb http://gandalfn.club.fr/ubuntu feisty motu
deb http://ubuntu.moshen.de/ feisty eyecandy

and in synaptic, my installed version states 1:0.5.0-0ubuntu1

Do you know if this is the correct version with the patch? If not is there another source to get ubuntu deb's?

If not, I assume a compile of the 0.5.0 source linked here has the patches already?

Thanks for your help!

-J

miatawnt2b
June 27th, 2007, 07:18 PM
OK, so I used the How-To to install the git version on feisty. now when I type compiz --version it says 0.5.1. Good enough. However, my titlebar buttons still do not follow the metacity layout. I believe the only old piece of code that I am running is the compiz tray icon version 0.10.4. Would this couse problems?

Thanks,
-J

karmapolice
June 27th, 2007, 11:23 PM
I'm using the git version in ArchLinux and it works for me, are you using the gtk-window-decorator or emerald?

miatawnt2b
June 28th, 2007, 01:02 PM
I am using the gtk-window-decorator.git as outlined in the git Feisty How-To.

-J