X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fhandlers.c;h=6e6626a9671f275f7a51141b42857fabfb8ced75;hb=2f992f5c0ed75452a61b19d6c118e5f5f3ba67e9;hp=0404b8bf8a11aaf90f0e2d40978ce0696449d913;hpb=f6a21994bfd0edbf9376a9562ba7bdba3595e08a;p=i3%2Fi3 diff --git a/src/handlers.c b/src/handlers.c index 0404b8bf..6e6626a9 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -204,7 +204,7 @@ int handle_enter_notify(void *ignored, xcb_connection_t *conn, return 1; con_focus(con_descend_focused(con)); - x_push_changes(croot); + tree_render(); return 1; } @@ -251,30 +251,28 @@ int handle_motion_notify(void *ignored, xcb_connection_t *conn, xcb_motion_notif return 1; } -#if 0 /* * Called when the keyboard mapping changes (for example by using Xmodmap), * we need to update our key bindings then (re-translate symbols). * */ int handle_mapping_notify(void *ignored, xcb_connection_t *conn, xcb_mapping_notify_event_t *event) { - if (event->request != XCB_MAPPING_KEYBOARD && - event->request != XCB_MAPPING_MODIFIER) - return 0; + if (event->request != XCB_MAPPING_KEYBOARD && + event->request != XCB_MAPPING_MODIFIER) + return 0; - DLOG("Received mapping_notify for keyboard or modifier mapping, re-grabbing keys\n"); - xcb_refresh_keyboard_mapping(keysyms, event); + DLOG("Received mapping_notify for keyboard or modifier mapping, re-grabbing keys\n"); + xcb_refresh_keyboard_mapping(keysyms, event); - xcb_get_numlock_mask(conn); + xcb_get_numlock_mask(conn); - ungrab_all_keys(conn); - translate_keysyms(); - grab_all_keys(conn, false); + ungrab_all_keys(conn); + translate_keysyms(); + grab_all_keys(conn, false); - return 0; + return 0; } -#endif /* * A new window appeared on the screen (=was mapped), so let’s manage it. * @@ -336,8 +334,7 @@ int handle_configure_request(void *prophs, xcb_connection_t *conn, xcb_configure DLOG("Configure request!\n"); if (con_is_floating(con) && con_is_leaf(con)) { /* find the height for the decorations */ - i3Font *font = load_font(conn, config.font); - int deco_height = font->height + 5; + int deco_height = config.font.height + 5; /* we actually need to apply the size/position changes to the *parent* * container */ Rect bsr = con_border_style_rect(con);