Do not resend focus on click
Patch status: merged
Patch by Tony Crisci
Long description:
Do not set focused_id to XCB_NONE in route click to force resend focus, in some cases to an already focused window. Sending focus again on click is not necessary and may cause problems with certain wine or mono apps. Resending focus makes combo boxes not work in Office 2010.
To apply this patch, use:
curl http://cr.i3wm.org/patch/642/raw.patch | git am
b/src/click.c
20 |
@@ -214,7 +214,6 @@ static int route_click(Con *con, xcb_button_press_event_t *event, const bool mod |
21 |
|
22 |
if (ws != focused_workspace) |
23 |
workspace_show(ws); |
24 |
- focused_id = XCB_NONE; |
25 |
|
26 |
/* get the floating con */ |
27 |
Con *floatingcon = con_inside_floating(con); |
b/src/x.c
32 |
@@ -15,9 +15,9 @@ |
33 |
/* Stores the X11 window ID of the currently focused window */ |
34 |
xcb_window_t focused_id = XCB_NONE; |
35 |
|
36 |
-/* Because 'focused_id' might be reset to force input focus (after click to |
37 |
- * raise), we separately keep track of the X11 window ID to be able to always |
38 |
- * tell whether the focused window actually changed. */ |
39 |
+/* Because 'focused_id' might be reset to force input focus, we separately keep |
40 |
+ * track of the X11 window ID to be able to always tell whether the focused |
41 |
+ * window actually changed. */ |
42 |
static xcb_window_t last_focused = XCB_NONE; |
43 |
|
44 |
/* Stores coordinates to warp mouse pointer to if set */ |