]> Dogcows Code - chaz/openbox/commitdiff
synched with bb-cvs. couple bug fixes.
authorDana Jansens <danakj@orodu.net>
Wed, 5 Jun 2002 04:20:08 +0000 (04:20 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 5 Jun 2002 04:20:08 +0000 (04:20 +0000)
src/Screen.cc
src/Window.cc
src/Workspace.cc
src/blackbox.cc
util/Makefile.am

index 8779733cbcd1a90129847e188ead7e52093751e6..512475c88cd36163531bb6fe29c3f0e3ed821f23 100644 (file)
@@ -1040,10 +1040,14 @@ void BScreen::changeWorkspaceID(unsigned int id) {
 
     workspacemenu->setItemSelected(current_workspace->getID() + 2, False);
 
-    if (blackbox->getFocusedWindow() &&
-        blackbox->getFocusedWindow()->getScreen() == this &&
-        ! blackbox->getFocusedWindow()->isStuck()) {
-      current_workspace->setLastFocusedWindow(blackbox->getFocusedWindow());
+    BlackboxWindow *focused = blackbox->getFocusedWindow();
+    if (focused && focused->getScreen() == this && ! focused->isStuck()) {
+      if (focused->getWorkspaceNumber() != current_workspace->getID()) {
+        fprintf(stderr, "%s is on the wrong workspace, aborting\n",
+                focused->getTitle());
+        abort();
+      }
+      current_workspace->setLastFocusedWindow(focused);
       blackbox->setFocusedWindow((BlackboxWindow *) 0);
     }
 
@@ -1079,7 +1083,8 @@ void BScreen::manageWindow(Window w) {
 
   XMapRequestEvent mre;
   mre.window = w;
-  win->restoreAttributes();
+  if (blackbox->isStartup())
+    win->restoreAttributes();
   win->mapRequestEvent(&mre);
 }
 
index be03e4aab012d3c1b7f9204668be3a5e36132138..2fe0928f6a9a8d51487686f12536967dd05e254a 100644 (file)
@@ -268,7 +268,6 @@ BlackboxWindow::BlackboxWindow(Blackbox *b, Window w, BScreen *s) {
 
 
 BlackboxWindow::~BlackboxWindow(void) {
-
 #ifdef    DEBUG
   fprintf(stderr, "BlackboxWindow::~BlackboxWindow: destroying 0x%lx\n",
           client.window);
index 35b3b593f3fc221d0a51d57db6dbd23b13a74b89..64710a59a999f86d14b089ef5600c22f2bbdf9da 100644 (file)
@@ -224,7 +224,6 @@ void Workspace::lowerTransients(const BlackboxWindow * const win,
       wkspc->stackingList.push_back((*it));
     }
   }
-
 }
 
 
index 266d0e7318a6b1ffa807a48699e4e7b899eada73..118a17bc3f0c7b4e6a56ca9618729f05c30b8f0f 100644 (file)
@@ -666,10 +666,9 @@ void Blackbox::process_event(XEvent *e) {
       } else if(e->xclient.message_type == getBlackboxChangeWorkspaceAtom()) {
         BScreen *screen = searchScreen(e->xclient.window);
 
-        if (screen && e->xclient.data.l[0] >= 0 &&
-            e->xclient.data.l[0] <
-            static_cast<signed>(screen->getWorkspaceCount()))
-          screen->changeWorkspaceID(e->xclient.data.l[0]);
+        unsigned int workspace = e->xclient.data.l[0];
+        if (screen && workspace < screen->getWorkspaceCount())
+          screen->changeWorkspaceID(workspace);
       } else if (e->xclient.message_type == getBlackboxChangeWindowFocusAtom()) {
         BlackboxWindow *win = searchWindow(e->xclient.window);
 
index e0f3ecc68b654478234943de7095f335af0e2ee1..9d60a964e5967c9228b62fadac521bb0d45d70a3 100644 (file)
@@ -11,7 +11,7 @@ bsetroot_LDADD =      ../src/BaseDisplay.o ../src/Color.o ../src/GCCache.o ../src/Tex
 MAINTAINERCLEANFILES = Makefile.in
 
 distclean-local:
-       rm -f *\~
+       rm -f *\~ .\#*
 
 # local dependencies
 
This page took 0.031787 seconds and 4 git commands to generate.