aboutsummaryrefslogtreecommitdiffstats
path: root/x11-wm
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2011-07-08 18:00:40 +0800
committerdanfe <danfe@FreeBSD.org>2011-07-08 18:00:40 +0800
commit574013401c51b57bd442883466bd588b44c7a935 (patch)
treef431a98ad570b2904dde46afd223d458ce633c38 /x11-wm
parent1727a6553b7651cc7bc4dadeffeeac825a31459b (diff)
downloadfreebsd-ports-gnome-574013401c51b57bd442883466bd588b44c7a935.tar.gz
freebsd-ports-gnome-574013401c51b57bd442883466bd588b44c7a935.tar.zst
freebsd-ports-gnome-574013401c51b57bd442883466bd588b44c7a935.zip
Add two patches to Blackbox:
Setting _NET_NUMBER_OF_DESKTOPS may cause Blackbox to explode. The problem is due to a bad loop condition in Screen.cc::clientMessageEvent(). If the difference between the new number of desktops and initial workspaceCount() is odd, the condition is always true, or at least until "number" underflows or overflows. BB will usually end up munching a lot of memory and dying when it creates thousands of desktops first, though (tracker ID 2306646). Blackbox does not handle transparency correctly in its slit, which causes applications like x11/bbdock to display garbled graphics. Patch suggested by the author of BBDock. Port revision will be bumped separately, as there are more changes coming. Approved by: maintainer
Diffstat (limited to 'x11-wm')
-rw-r--r--x11-wm/blackbox/files/patch-src_Screen.cc19
-rw-r--r--x11-wm/blackbox/files/patch-src_Slit.cc16
2 files changed, 35 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()) {
diff --git a/x11-wm/blackbox/files/patch-src_Slit.cc b/x11-wm/blackbox/files/patch-src_Slit.cc
new file mode 100644
index 000000000000..0ea8917f4c56
--- /dev/null
+++ b/x11-wm/blackbox/files/patch-src_Slit.cc
@@ -0,0 +1,16 @@
+--- src/Slit.cc.orig 2005-01-04 20:58:33.000000000 +0800
++++ src/Slit.cc 2011-06-21 13:31:00.000000000 +0800
+@@ -248,6 +248,13 @@
+ bt::PixmapCache::find(screen->screenNumber(), texture,
+ frame.rect.width(), frame.rect.height(),
+ frame.pixmap);
++
++ if ((texture.texture() & bt::Texture::Gradient) && frame.pixmap)
++ XSetWindowBackgroundPixmap(display, frame.window, frame.pixmap);
++ else if ((texture.texture() & bt::Texture::Solid))
++ XSetWindowBackground(display, frame.window,
++ texture.color1().pixel(screen->screenNumber()));
++
+ XClearArea(display, frame.window, 0, 0,
+ frame.rect.width(), frame.rect.height(), True);
+