X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fblackbox.cc;h=6bd47f9c4fee61fdf6e7eacb49d4fdac5737b729;hb=cac80d06ef93fac0b4d39ec28fada1076f5bf28d;hp=dafc6bdfa8d8ce610008dfee93a13b12b3dcb177;hpb=32c13697524e01a21e5b667188cad73434693ecb;p=chaz%2Fopenbox diff --git a/src/blackbox.cc b/src/blackbox.cc index dafc6bdf..6bd47f9c 100644 --- a/src/blackbox.cc +++ b/src/blackbox.cc @@ -328,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); @@ -964,6 +972,9 @@ void Blackbox::process_event(XEvent *e) { bool Blackbox::handleSignal(int sig) { switch (sig) { case SIGHUP: + restart(); + break; + case SIGUSR1: reconfigure(); break;