From 510aff765c883262995f4cfefbe02e8ef916edde Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 24 Feb 2012 12:29:30 +0900 Subject: [PATCH] add wmctrl-sticky-workspace.patch --- wmctrl-sticky-workspace.patch | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 wmctrl-sticky-workspace.patch diff --git a/wmctrl-sticky-workspace.patch b/wmctrl-sticky-workspace.patch new file mode 100644 index 0000000..90964e5 --- /dev/null +++ b/wmctrl-sticky-workspace.patch @@ -0,0 +1,32 @@ +--- a/main.c ++++ a/main.c +@@ -681,7 +681,7 @@ static int window_to_desktop (Display *disp, Window win, int desktop) {/*{{{*/ + unsigned long *cur_desktop = NULL; + Window root = DefaultRootWindow(disp); + +- if (desktop == -1) { ++ if (desktop == -2) { + if (! (cur_desktop = (unsigned long *)get_property(disp, root, + XA_CARDINAL, "_NET_CURRENT_DESKTOP", NULL))) { + if (! (cur_desktop = (unsigned long *)get_property(disp, root, +@@ -897,7 +897,7 @@ static int action_window (Display *disp, Window win, char mode) {/*{{{*/ + + case 'R': + /* move the window to the current desktop and activate it => -r */ +- if (window_to_desktop(disp, win, -1) == EXIT_SUCCESS) { ++ if (window_to_desktop(disp, win, -2) == EXIT_SUCCESS) { + usleep(100000); /* 100 ms - make sure the WM has enough + time to move the window, before we activate it */ + return activate_window(disp, win, FALSE); +--- a/wmctrl.1 ++++ a/wmctrl.1 +@@ -258,7 +258,8 @@ Include WM_CLASS in the window list or interpret as the WM_CLASS name. + .TP + .I + A Desktop is always specified by an integer which represents the +-desktop numbers. Desktop numbers start at 0. ++desktop numbers. Desktop numbers start at 0. Use -1 to pin to all ++desktops. + + .TP + .I