X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2FWindow.cc;h=dcbb5f08afc55654e5c2f1806fd7d6cbaf33670a;hb=7f001973a8154b1fa9db110092c438b862f81c3b;hp=b02b535751aa6ca9faf602d35512ec6bb7e0bbf2;hpb=1f5dd220e735a0a9c0532ff8aa8b361d3327b0f2;p=chaz%2Fopenbox diff --git a/src/Window.cc b/src/Window.cc index b02b5357..dcbb5f08 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -475,7 +475,13 @@ Window BlackboxWindow::createToplevelWindow(void) { attrib_create.background_pixmap = None; attrib_create.colormap = screen->getColormap(); attrib_create.override_redirect = True; - attrib_create.event_mask = EnterWindowMask | LeaveWindowMask; + attrib_create.event_mask = EnterWindowMask | LeaveWindowMask | + ButtonPress; + /* + We catch button presses because other wise they get passed down to the + root window, which will then cause root menus to show when you click the + window's frame. + */ return XCreateWindow(blackbox->getXDisplay(), screen->getRootWindow(), 0, 0, 1, 1, frame.border_w, screen->getDepth(), @@ -2681,7 +2687,7 @@ void BlackboxWindow::redrawCloseButton(bool pressed) const { XClearWindow(blackbox->getXDisplay(), frame.close_button); BPen pen((flags.focused) ? screen->getWindowStyle()->b_pic_focus : - screen->getWindowStyle()->b_pic_unfocus, 0, 2); + screen->getWindowStyle()->b_pic_unfocus); XDrawLine(blackbox->getXDisplay(), frame.close_button, pen.gc(), 2, 2, (frame.button_w - 3), (frame.button_w - 3)); XDrawLine(blackbox->getXDisplay(), frame.close_button, pen.gc(),