summaryrefslogtreecommitdiff
path: root/src/w32term.c
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2007-09-04 21:38:40 +0000
committerJason Rumney <jasonr@gnu.org>2007-09-04 21:38:40 +0000
commit1526bc23737f6bbbd3068da258e6c036bed4ab20 (patch)
tree512ca4bcb50c0c29d473e09735777d2cb40ede60 /src/w32term.c
parent92cd6a7c40a7db9ae2b8855ab41bf3b5e6b9133c (diff)
downloademacs-1526bc23737f6bbbd3068da258e6c036bed4ab20.tar.gz
Support for horizontal scroll wheels on some mice:
(construct_mouse_wheel): Make HORIZ_WHEEL_EVENT from WM_MOUSEHWHEEL. (w32_read_socket) <WM_MOUSEHWHEEL>: Treat as WM_MOUSEWHEEL. MULTI_KBOARD support: (w32_create_terminal) [MULTI_KBOARD]: Create a new keyboard for the terminal.
Diffstat (limited to 'src/w32term.c')
-rw-r--r--src/w32term.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 100af4ebc21..2e3860b6637 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -3150,7 +3150,8 @@ construct_mouse_wheel (result, msg, f)
POINT p;
int delta;
- result->kind = WHEEL_EVENT;
+ result->kind = msg->msg.message == WM_MOUSEHWHEEL ? HORIZ_WHEEL_EVENT
+ : WHEEL_EVENT;
result->code = 0;
result->timestamp = msg->msg.time;
@@ -4486,6 +4487,7 @@ w32_read_socket (sd, expected, hold_quit)
}
case WM_MOUSEWHEEL:
+ case WM_MOUSEHWHEEL:
{
if (dpyinfo->grabbed && last_mouse_frame
&& FRAME_LIVE_P (last_mouse_frame))
@@ -6302,6 +6304,22 @@ w32_create_terminal (struct w32_display_info *dpyinfo)
terminal->memory_below_frame = 0; /* We don't remember what scrolls
off the bottom. */
+#ifdef MULTI_KBOARD
+ /* We don't yet support separate terminals on W32, so don't try to share
+ keyboards between virtual terminals that are on the same physical
+ terminal like X does. */
+ terminal->kboard = (KBOARD *) xmalloc (sizeof (KBOARD));
+ init_kboard (terminal->kboard);
+ terminal->kboard->next_kboard = all_kboards;
+ all_kboards = terminal->kboard;
+ /* Don't let the initial kboard remain current longer than necessary.
+ That would cause problems if a file loaded on startup tries to
+ prompt in the mini-buffer. */
+ if (current_kboard == initial_kboard)
+ current_kboard = terminal->kboard;
+ terminal->kboard->reference_count++;
+#endif
+
return terminal;
}