]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/src/xcb.c
Merge pull request #1657 from Georgiy-Tugai/fix-flickering-shortened
[i3/i3] / i3bar / src / xcb.c
index 45705c078428d3a09a3fbdbf9cfa7486a6536229..11a017cf386224be3054596692a48ea1eb120b99 100644 (file)
@@ -2,7 +2,7 @@
  * vim:ts=4:sw=4:expandtab
  *
  * i3bar - an xcb-based status- and ws-bar for i3
- * © 2010-2012 Axel Wagner and contributors (see also: LICENSE)
+ * © 2010 Axel Wagner and contributors (see also: LICENSE)
  *
  * xcb.c: Communicating with X
  *
@@ -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;