summaryrefslogtreecommitdiff
path: root/x11-wm/blackbox/files/patch-src_Screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'x11-wm/blackbox/files/patch-src_Screen.cc')
-rw-r--r--x11-wm/blackbox/files/patch-src_Screen.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/x11-wm/blackbox/files/patch-src_Screen.cc b/x11-wm/blackbox/files/patch-src_Screen.cc
new file mode 100644
index 000000000000..133d759c8367
--- /dev/null
+++ b/x11-wm/blackbox/files/patch-src_Screen.cc
@@ -0,0 +1,19 @@
+--- src/Screen.cc.orig 2008-11-17 11:30:06.000000000 -0800
++++ src/Screen.cc 2008-11-17 11:31:37.000000000 -0800
+@@ -1870,11 +1870,12 @@
+
+ if (event->message_type == _blackbox->ewmh().numberOfDesktops()) {
+ unsigned int number = event->data.l[0];
+- if (number > workspaceCount()) {
+- for (; number != workspaceCount(); --number)
++ unsigned int wsCount = workspaceCount();
++ if (number > wsCount) {
++ for (; number != wsCount; --number)
+ addWorkspace();
+- } else if (number < workspaceCount()) {
+- for (; number != workspaceCount(); ++number)
++ } else if (number < wsCount) {
++ for (; number != wsCount; ++number)
+ removeLastWorkspace();
+ }
+ } else if (event->message_type == _blackbox->ewmh().desktopNames()) {