X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FWindow.cc;h=0a02daa196b162aa77b718d3c318308a8b3e2a30;hb=57fb41c8060eaa2f29b25b08e3813b3dc140f165;hp=431d3167f0ad72a0a79453820fea02a159b5d450;hpb=5f9c458fbc5fff1fdde65981084b658fcde5eabc;p=chaz%2Fopenbox diff --git a/src/Window.cc b/src/Window.cc index 431d3167..0a02daa1 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -56,6 +56,9 @@ #endif // SLIT #include "Util.h" +#include +using namespace std; + /* * Initializes the class with default values/the window's set initial values. */ @@ -1385,12 +1388,12 @@ Bool OpenboxWindow::setInputFocus(void) { } else if (! flags.focused) { if (focus_mode == F_LocallyActive || focus_mode == F_Passive) XSetInputFocus(display, client.window, - RevertToPointerRoot, CurrentTime); + RevertToPointerRoot, CurrentTime); else XSetInputFocus(display, screen->getRootWindow(), RevertToNone, CurrentTime); - openbox.setFocusedWindow(this); + openbox.focusWindow(this); if (flags.send_focus_message) { XEvent ce; @@ -1527,6 +1530,9 @@ void OpenboxWindow::withdraw(void) { void OpenboxWindow::maximize(unsigned int button) { + if (flags.moving) + endMove(); + // handle case where menu is open then the max button is used instead if (windowmenu && windowmenu->isVisible()) windowmenu->hide(); @@ -3048,6 +3054,8 @@ void OpenboxWindow::restore(void) { XMapWindow(display, client.window); XFlush(display); + + delete this; }