From: Michael Stapelberg Date: Tue, 10 Mar 2009 23:45:49 +0000 (+0100) Subject: Bugfix: Don’t handle mouse click events inside the titlebar X-Git-Tag: 3.a~38 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ec290cbfa99004df2f7a1582f3d8b17813c79b5f;p=i3%2Fi3 Bugfix: Don’t handle mouse click events inside the titlebar --- diff --git a/src/handlers.c b/src/handlers.c index 4c3024b5..2240e323 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -237,6 +237,13 @@ int handle_button_press(void *ignored, xcb_connection_t *conn, xcb_button_press_ return 1; } + /* Don’t handle events inside the titlebar, only borders are interesting */ + i3Font *font = load_font(conn, config.font); + if (event->event_y >= 2 && event->event_y <= (font->height + 2 + 2)) { + LOG("click on titlebar\n"); + return 1; + } + if (event->event_y < 2) { /* This was a press on the top border */ if (con->row == 0)