]> Dogcows Code - chaz/openbox/blobdiff - src/blackbox.cc
fix case where the window group deletes itself. somehow missed this while syncing! :(
[chaz/openbox] / src / blackbox.cc
index 631e819e1bab33c5c499efd112ca2e0739def576..ae3b5ead51865af7bff0b618ce94c300f3120f9b 100644 (file)
@@ -164,7 +164,6 @@ Blackbox::Blackbox(char **m_argv, char *dpy_name, char *rc, char *menu)
   active_screen = 0;
   focused_window = changing_window = (BlackboxWindow *) 0;
 
-  XrmInitialize();
   load_rc();
 
   xatom = new XAtom(getXDisplay());
@@ -329,10 +328,18 @@ void Blackbox::process_event(XEvent *e) {
     BlackboxWindow *win = searchWindow(e->xmaprequest.window);
 
     if (win) {
+      bool focus = False;
       if (win->isIconic()) {
         win->deiconify();
-        win->setInputFocus();
+        focus = True;
+      }
+      if (win->isShaded()) {
+        win->shade();
+        focus = True;
       }
+
+      if (focus && (win->isTransient() || win->getScreen()->doFocusNew()))
+        win->setInputFocus();
     } else {
       BScreen *screen = searchScreen(e->xmaprequest.parent);
 
@@ -703,9 +710,11 @@ void Blackbox::process_event(XEvent *e) {
         if (win) {
           if (win->isIconic())
             win->deiconify(False, True);
+          if (win->isShaded())
+            win->shade();
           if (win->isVisible() && win->setInputFocus()) {
-            //win->getScreen()->getWorkspace(win->getWorkspaceNumber())->
-            //  raiseWindow(win);
+            win->getScreen()->getWorkspace(win->getWorkspaceNumber())->
+              raiseWindow(win);
             win->installColormap(True);
           }
         }
@@ -965,6 +974,9 @@ void Blackbox::process_event(XEvent *e) {
 bool Blackbox::handleSignal(int sig) {
   switch (sig) {
   case SIGHUP:
+    restart();
+    break;
+
   case SIGUSR1:
     reconfigure();
     break;
@@ -1202,7 +1214,7 @@ void Blackbox::save_rc(void) {
 
 void Blackbox::load_rc(void) {
   if (! config.load())
-        config.create();
+    config.create();
   
   string s;
 
This page took 0.021595 seconds and 4 git commands to generate.