diff options
| author | Jason Rumney | 2007-09-04 21:38:40 +0000 |
|---|---|---|
| committer | Jason Rumney | 2007-09-04 21:38:40 +0000 |
| commit | 1526bc23737f6bbbd3068da258e6c036bed4ab20 (patch) | |
| tree | 512ca4bcb50c0c29d473e09735777d2cb40ede60 /src | |
| parent | 92cd6a7c40a7db9ae2b8855ab41bf3b5e6b9133c (diff) | |
| download | emacs-1526bc23737f6bbbd3068da258e6c036bed4ab20.tar.gz emacs-1526bc23737f6bbbd3068da258e6c036bed4ab20.zip | |
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')
| -rw-r--r-- | src/w32term.c | 20 |
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) | |||
| 3150 | POINT p; | 3150 | POINT p; |
| 3151 | int delta; | 3151 | int delta; |
| 3152 | 3152 | ||
| 3153 | result->kind = WHEEL_EVENT; | 3153 | result->kind = msg->msg.message == WM_MOUSEHWHEEL ? HORIZ_WHEEL_EVENT |
| 3154 | : WHEEL_EVENT; | ||
| 3154 | result->code = 0; | 3155 | result->code = 0; |
| 3155 | result->timestamp = msg->msg.time; | 3156 | result->timestamp = msg->msg.time; |
| 3156 | 3157 | ||
| @@ -4486,6 +4487,7 @@ w32_read_socket (sd, expected, hold_quit) | |||
| 4486 | } | 4487 | } |
| 4487 | 4488 | ||
| 4488 | case WM_MOUSEWHEEL: | 4489 | case WM_MOUSEWHEEL: |
| 4490 | case WM_MOUSEHWHEEL: | ||
| 4489 | { | 4491 | { |
| 4490 | if (dpyinfo->grabbed && last_mouse_frame | 4492 | if (dpyinfo->grabbed && last_mouse_frame |
| 4491 | && FRAME_LIVE_P (last_mouse_frame)) | 4493 | && FRAME_LIVE_P (last_mouse_frame)) |
| @@ -6302,6 +6304,22 @@ w32_create_terminal (struct w32_display_info *dpyinfo) | |||
| 6302 | terminal->memory_below_frame = 0; /* We don't remember what scrolls | 6304 | terminal->memory_below_frame = 0; /* We don't remember what scrolls |
| 6303 | off the bottom. */ | 6305 | off the bottom. */ |
| 6304 | 6306 | ||
| 6307 | #ifdef MULTI_KBOARD | ||
| 6308 | /* We don't yet support separate terminals on W32, so don't try to share | ||
| 6309 | keyboards between virtual terminals that are on the same physical | ||
| 6310 | terminal like X does. */ | ||
| 6311 | terminal->kboard = (KBOARD *) xmalloc (sizeof (KBOARD)); | ||
| 6312 | init_kboard (terminal->kboard); | ||
| 6313 | terminal->kboard->next_kboard = all_kboards; | ||
| 6314 | all_kboards = terminal->kboard; | ||
| 6315 | /* Don't let the initial kboard remain current longer than necessary. | ||
| 6316 | That would cause problems if a file loaded on startup tries to | ||
| 6317 | prompt in the mini-buffer. */ | ||
| 6318 | if (current_kboard == initial_kboard) | ||
| 6319 | current_kboard = terminal->kboard; | ||
| 6320 | terminal->kboard->reference_count++; | ||
| 6321 | #endif | ||
| 6322 | |||
| 6305 | return terminal; | 6323 | return terminal; |
| 6306 | } | 6324 | } |
| 6307 | 6325 | ||