[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master b1d0d8e1f7: Allow C-mouse-2 to split windows on XInput 2 builds
From: |
Po Lu |
Subject: |
master b1d0d8e1f7: Allow C-mouse-2 to split windows on XInput 2 builds |
Date: |
Fri, 11 Mar 2022 01:00:36 -0500 (EST) |
branch: master
commit b1d0d8e1f77eb3882a490aea6e31b7ec9ae642c1
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Allow C-mouse-2 to split windows on XInput 2 builds
* src/xterm.c (handle_one_xevent): Use x_scroll_bar_handle_click
if ControlMask is set.
---
src/xterm.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/xterm.c b/src/xterm.c
index 5b1e102379..2adf70b829 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -12660,17 +12660,25 @@ handle_one_xevent (struct x_display_info *dpyinfo,
xembed_send_message (f, xev->time,
XEMBED_REQUEST_FOCUS, 0, 0, 0);
}
-#ifndef USE_TOOLKIT_SCROLL_BARS
else
{
struct scroll_bar *bar
= x_window_to_scroll_bar (dpyinfo->display,
xev->event, 2);
+#ifndef USE_TOOLKIT_SCROLL_BARS
if (bar)
x_scroll_bar_handle_click (bar, (XEvent *) &bv, &inev.ie);
- }
+#else
+ /* Make the "Ctrl-Mouse-2 splits window" work for toolkit
+ scroll bars. */
+ if (bar && xev->mods.effective & ControlMask)
+ {
+ x_scroll_bar_handle_click (bar, (XEvent *) &bv, &inev.ie);
+ *finish = X_EVENT_DROP;
+ }
#endif
+ }
if (xev->evtype == XI_ButtonPress)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master b1d0d8e1f7: Allow C-mouse-2 to split windows on XInput 2 builds,
Po Lu <=