From ec290cbfa99004df2f7a1582f3d8b17813c79b5f Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 11 Mar 2009 00:45:49 +0100 Subject: [PATCH] =?utf8?q?Bugfix:=20Don=E2=80=99t=20handle=20mouse=20click?= =?utf8?q?=20events=20inside=20the=20titlebar?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/handlers.c | 7 +++++++ 1 file changed, 7 insertions(+) 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) -- 2.39.5