Openbox2 NET_WM_FULLSCREEN fix

Arwed von Merkatz v.merkatz at gmx.net
Tue Sep 23 04:51:40 EDT 2003


I guess most people are using ob3 nowadays, but here's a patch to fix
the NET_WM_FULLSCREEN support in ob2 anway. It now works correctly for
all applications i use that use that property, as correctly as ob2 can
(no full support because ob2 doesn't support layers).
The patch doesn't include the xinerama fixes someone else mailed to the
list some time ago, since i don't have a xinerama setup and can't test
it.

p.s.: i included the gcc 3.3 compile fix.
-- 
Arwed v. Merkatz
Grimoire Guru for video
Grimoire Guru for xfce
Sourcemage GNU/Linux
http://www.sourcemage.org
-------------- next part --------------
diff -Nur openbox-2.3.1/src/Window.cc openbox-2.3.1-fsfix/src/Window.cc
--- openbox-2.3.1/src/Window.cc	2003-04-20 04:46:59.000000000 +0200
+++ openbox-2.3.1-fsfix/src/Window.cc	2003-09-22 23:50:38.000000000 +0200
@@ -2094,19 +2094,16 @@
 void BlackboxWindow::doFullscreen(void) {
   if (flags.fullscreen) {
     // save current size/position (can i use the premax variables???)
-    blackbox_attrib.prefull_x = frame.rect.left() - frame.margin.left;
-    blackbox_attrib.prefull_y = frame.rect.y() - frame.margin.top;
-    blackbox_attrib.prefull_w = frame.rect.width() + frame.margin.left +
-      frame.margin.right;
-    blackbox_attrib.prefull_h =
-      client.rect.height() + frame.margin.top + frame.margin.bottom;
-    // go fullscreen
-    client.rect = screen->getRect();
-    frame.rect = screen->getRect();
-    configure(frame.rect.x(), frame.rect.y(),
-              frame.rect.width(), frame.rect.height());
-    // disbale decorations
+    blackbox_attrib.prefull_x = frame.rect.left();
+    blackbox_attrib.prefull_y = frame.rect.y();
+    blackbox_attrib.prefull_w = frame.rect.width();
+    blackbox_attrib.prefull_h = frame.rect.height();
     enableDecor(False);
+    client.rect = screen->getRect();
+    frame.rect.setPos(0,0);
+    //frame.rect = screen->getRect();
+    configure(client.rect.x(), client.rect.y(),
+              client.rect.width(), client.rect.height());
     screen->getWorkspace(blackbox_attrib.workspace)->raiseWindow(this);
     // disable functions, save old functions
     blackbox_attrib.prefull_functions = functions;
@@ -2119,8 +2116,9 @@
     // restore size
     configure(blackbox_attrib.prefull_x, blackbox_attrib.prefull_y,
               blackbox_attrib.prefull_w, blackbox_attrib.prefull_h);
-    blackbox_attrib.prefull_x = blackbox_attrib.prefull_y = 0;
-    blackbox_attrib.prefull_w = blackbox_attrib.prefull_h = 0;
+    // why the hell does this crash epiphany ???
+    //blackbox_attrib.prefull_x = blackbox_attrib.prefull_y = 0;
+    //blackbox_attrib.prefull_w = blackbox_attrib.prefull_h = 0;
   }
 }
 
diff -Nur openbox-2.3.1/util/epist/keytree.hh openbox-2.3.1-fsfix/util/epist/keytree.hh
--- openbox-2.3.1/util/epist/keytree.hh	2003-03-22 01:56:01.000000000 +0100
+++ openbox-2.3.1-fsfix/util/epist/keytree.hh	2003-09-22 18:25:39.000000000 +0200
@@ -24,6 +24,7 @@
 #define _keytree_hh
 
 #include <list>
+#include <cassert>
 #include "../../src/Timer.hh"
 #include "actions.hh"
 #include "screen.hh"


More information about the openbox mailing list