X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FWindow.cc;h=ec042c305ae77e80cb253bdddbb40d7f9ed4afd7;hb=eb8a11a5a7b066ada63cc3550f8314f53eaf1a39;hp=431d3167f0ad72a0a79453820fea02a159b5d450;hpb=5f9c458fbc5fff1fdde65981084b658fcde5eabc;p=chaz%2Fopenbox diff --git a/src/Window.cc b/src/Window.cc index 431d3167..ec042c30 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -1385,12 +1385,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 +1527,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(); @@ -2202,7 +2205,6 @@ void OpenboxWindow::redrawCloseButton(Bool pressed) { void OpenboxWindow::mapRequestEvent(XMapRequestEvent *re) { - cout << "MAP REQUEST " << client.window << " " << client.title << endl; if (re->window == client.window) { #ifdef DEBUG fprintf(stderr, i18n->getMessage(WindowSet, WindowMapRequest, @@ -2791,7 +2793,6 @@ void OpenboxWindow::startMove(int x, int y) { } frame.grab_x = x - frame.x - frame.border_w; frame.grab_y = y - frame.y - frame.border_w; - cout << "START MOVE " << client.window << " " << client.title << endl; } @@ -2885,7 +2886,6 @@ void OpenboxWindow::endMove() { // cause problems XEvent e; while (XCheckTypedWindowEvent(display, frame.window, MotionNotify, &e)); - cout << "END MOVE " << client.window << " " << client.title << endl; } @@ -2904,7 +2904,6 @@ void OpenboxWindow::motionNotifyEvent(XMotionEvent *me) { Bool left = resize_zone & ZoneLeft; if (! flags.resizing) { - cout << "START RESIZE " << client.window << " " << client.title << endl; Cursor cursor; if (resize_zone & ZoneTop) cursor = (resize_zone & ZoneLeft) ? @@ -2978,8 +2977,7 @@ void OpenboxWindow::motionNotifyEvent(XMotionEvent *me) { screen->showGeometry(gx, gy); } - } else - cout << "MOTION " << client.window << " " << client.title << endl; + } } @@ -3048,6 +3046,8 @@ void OpenboxWindow::restore(void) { XMapWindow(display, client.window); XFlush(display); + + delete this; }