openbsd-ports/x11/i3/patches/patch-src_click_c
dcoppa a6cc1eb92f Fixes, fixes, fixes:
i3-input: restore input focus on exit()
(upstream git commit 5779f573e7316664e4bff9d3ff17a234edc9d337)

Repect AR environment variable
(upstream git commit ef81bd183b579688b9f1a46a41c817b577d0b39e)

Fix scrolling on a tabbed titlebar which contains split cons
(upstream git commit 721fa7bdadac6d7f0c78f8c1eac0e66252ba2dc6)

Bugfix: ignore ConfigureRequests for scratchpad windows
(upstream git commit 36b106a9d39727b06909113e3f11552f2f1b6abe)

Bugfix: handle MapRequests sent between i3 registering as a wm and
handling events
(upstream git commit 625401d1628757a67a2ab4eeaa68be965683889c)

Bugfix: draw right tab border for split containers
(upstream git commit ae605bdd394bdf83a8015ac626b222fd40e35b04)
2012-12-27 19:58:05 +00:00

26 lines
1.4 KiB
Plaintext

$OpenBSD: patch-src_click_c,v 1.8 2012/12/27 19:58:05 dcoppa Exp $
Fix scrolling on a tabbed titlebar which contains split cons
(upstream git commit 721fa7bdadac6d7f0c78f8c1eac0e66252ba2dc6)
--- src/click.c.orig Wed Dec 12 00:08:17 2012
+++ src/click.c Thu Dec 27 15:26:45 2012
@@ -211,9 +211,16 @@ static int route_click(Con *con, xcb_button_press_even
event->detail == XCB_BUTTON_INDEX_5)) {
DLOG("Scrolling on a window decoration\n");
orientation_t orientation = (con->parent->layout == L_STACKED ? VERT : HORIZ);
+ /* Focus the currently focused container on the same level that the
+ * user scrolled on. e.g. the tabbed decoration contains
+ * "urxvt | i3: V[xterm geeqie] | firefox",
+ * focus is on the xterm, but the user scrolled on urxvt.
+ * The splitv container will be focused. */
+ Con *focused = con->parent;
+ focused = TAILQ_FIRST(&(focused->focus_head));
+ con_focus(focused);
/* To prevent scrolling from going outside the container (see ticket
* #557), we first check if scrolling is possible at all. */
- Con *focused = con_descend_focused(con->parent);
bool scroll_prev_possible = (TAILQ_PREV(focused, nodes_head, nodes) != NULL);
bool scroll_next_possible = (TAILQ_NEXT(focused, nodes) != NULL);
if (event->detail == XCB_BUTTON_INDEX_4 && scroll_prev_possible)