xfwm4 patch - window workspace movement

rootsuid rootsuid at gmail.com
Fri Feb 6 18:44:03 CET 2009


A while back I had mentioned modifying xfwm4 to allow you to change
workspace while drag moving a window.
It's a tiny patch with no settings.. no real point to disable it,
since they just don't use it.

Example usage:
I feel much more fluid holding alt, "grabbing" a window, and then
tapping 2 to go to workspace 2...
 - alt moving window would require easy_click on
- in the example, my workspace movement is alt+2, but I already have
alt down for easy_click movement =]
- this patch doesn't interact with easy_click, as you could just grab
the title bar and drag.. then switch workspace with whatever keys you
have setup

This is my first patch submission to xfce, and I'm not really sure on
the process (yes, even after some searching). So feel free to point me
in a better direction.
I did read about explicit copyrights, so: Copyright (C) 2009 The Xfce
development team.

Thanks,
--rootsuid
-------------- next part --------------
Index: src/client.c
===================================================================
--- src/client.c	(revision 29455)
+++ src/client.c	(working copy)
@@ -3820,6 +3820,18 @@
 
     if (xevent->type == KeyPress)
     {
+        int i;
+        int state=xevent->xkey.state&(ShiftMask | ControlMask | AltMask | MetaMask \
+            |  SuperMask | HyperMask);
+        for(i=0;i<12;i++)
+        {
+          if (xevent->xkey.keycode == screen_info->params->keys[KEY_WORKSPACE_1+i].keycode &&
+             state == screen_info->params->keys[KEY_WORKSPACE_1+i].modifier)
+           {
+               workspaceSwitch (screen_info, i, c, TRUE, xevent->xkey.time);
+           }
+        }
+
         while (XCheckMaskEvent (display_info->dpy, KeyPressMask, xevent))
         {
             /* Update the display time */


More information about the Xfce4-dev mailing list