]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/src/xcb.c
Only detect clicks within the statusline width.
[i3/i3] / i3bar / src / xcb.c
index fd268e9189400a7353c0ab65093cc0e6b1fc7bf9..a2f1be9a1964e6ef1f66b482fb64dc914f8a0aff 100644 (file)
@@ -420,7 +420,7 @@ void handle_button(xcb_button_press_event_t *event) {
         int offset = walk->rect.w - statusline_width - tray_width - logical_px(sb_hoff_px);
 
         x = original_x - offset;
-        if (x >= 0) {
+        if (x >= 0 && (size_t)x < statusline_width) {
             struct status_block *block;
             int sep_offset_remainder = 0;