xfwm4 changes

Thomas Leonard tal00r at ecs.soton.ac.uk
Mon Sep 23 13:44:43 CEST 2002


Hi guys,

I thought I'd try switching to xfwm4 for a bit. I'm planning to make a few
changes for a ROX version, possibly using a configure argument
(--with-rox-ui?) or a fork, if that's inconvenient for you.

My first patch (attached) is not ROX-specific; it stops xfwm4 from
deadlocking in a server grab on startup (the first Gtk application to use
pango causes a font cache window to be created, but xfwm4 aleady holds an
X server grab when it tries to do this).

After that, my plan is:

- Change the behaviour of button-3 on the window frame. Click-release will
  pop up the menu as now, but click-drag will work like using button-1 but
  without raising the window. Allows windows to be moved and resized
  without raising them.

- Get rid of the raising behaviour in some other places (eg, raise on
  click in the main area). Should this be an option?

- Allow options to be changed at run-time. Is this currently possible?
  Eg, changing the theme without restarting. I haven't looked into it yet,
  but it should be possible to have a configure option to either compile
  a ROX-Filer style in-process options box or an XSettings-client system
  for changing the prefs.

Quite impressed with it already, though :-)


-- 
Thomas Leonard			http://rox.sourceforge.net
tal00r at ecs.soton.ac.uk		tal197 at users.sourceforge.net
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
-------------- next part --------------
Index: main.c
===================================================================
RCS file: /cvsroot/xfce/xfce-devel/xfwm4/src/main.c,v
retrieving revision 1.15
diff -u -u -r1.15 main.c
--- main.c	20 Jul 2002 12:02:35 -0000	1.15
+++ main.c	23 Sep 2002 11:45:58 -0000
@@ -123,6 +123,7 @@
 
 void initialize(int argc, char **argv)
 {
+    PangoLayout *layout;
     struct sigaction act;
     int dummy;
     long ws;
@@ -195,6 +196,16 @@
     set_net_workarea(dpy, root, workspace_count, margins);
     XSetInputFocus(dpy, gnome_win, RevertToNone, CurrentTime);
     initGtkCallbacks();
+
+    /* The first time the first Gtk application on a display uses pango,
+     * pango grabs the XServer while it creates the font cache window.
+     * Therefore, force the cache window to be created now instead of
+     * trying to do it while we have another grab and deadlocking the server.
+     */
+    layout = gtk_widget_create_pango_layout(getDefaultGtkWidget(), "-");
+    pango_layout_get_pixel_extents(layout, NULL, NULL);
+    g_object_unref(G_OBJECT(layout));
+
     clientFrameAll();
 }
 


More information about the Xfce4-dev mailing list