]> git.sur5r.net Git - i3/i3/blobdiff - src/handlers.c
Merge branch 'master' into next
[i3/i3] / src / handlers.c
index 21a873420d989430394f7d1b25043ea76ca6e100..4f2d870eb00a9e3ee84503a1f9e6bd0178307e45 100644 (file)
@@ -339,7 +339,7 @@ static void handle_configure_request(xcb_configure_request_event_t *event) {
 
     if (fullscreen != con && con_is_floating(con) && con_is_leaf(con)) {
         /* find the height for the decorations */
-        int deco_height = config.font.height + 5;
+        int deco_height = con->deco_rect.height;
         /* we actually need to apply the size/position changes to the *parent*
          * container */
         Rect bsr = con_border_style_rect(con);
@@ -349,6 +349,11 @@ static void handle_configure_request(xcb_configure_request_event_t *event) {
         }
         Con *floatingcon = con->parent;
 
+        if (strcmp(con_get_workspace(floatingcon)->name, "__i3_scratch") == 0) {
+            DLOG("This is a scratchpad container, ignoring ConfigureRequest\n");
+            return;
+        }
+
         Rect newrect = floatingcon->rect;
 
         if (event->value_mask & XCB_CONFIG_WINDOW_X) {
@@ -836,7 +841,13 @@ static bool handle_hints(void *data, xcb_connection_t *conn, uint8_t state, xcb_
     }
 
     /* Update the flag on the client directly */
-    con->urgent = (xcb_icccm_wm_hints_get_urgency(&hints) != 0);
+    bool hint_urgent = (xcb_icccm_wm_hints_get_urgency(&hints) != 0);
+
+    if (con->urgency_timer == NULL) {
+        con->urgent = hint_urgent;
+    } else
+        DLOG("Discarding urgency WM_HINT because timer is running\n");
+
     //CLIENT_LOG(con);
     if (con->window) {
         if (con->urgent) {
@@ -846,6 +857,9 @@ static bool handle_hints(void *data, xcb_connection_t *conn, uint8_t state, xcb_
             con->window->urgent.tv_usec = 0;
         }
     }
+
+    con_update_parents_urgency(con);
+
     LOG("Urgency flag changed to %d\n", con->urgent);
 
     Con *ws;