changeset 83878:f65f55d787ec

Horizontal mouse wheel support: (w32_wnd_proc) <WM_DROPFILES>: Merge with WM_MOUSEWHEEL. <WM_MOUSEHWHEEL>: Pass new system message to lisp. MULTI_KBOARD support: (x_create_tip_frame) [MULTI_KBOARD]: Get keyboard from terminal.
author Jason Rumney <jasonr@gnu.org>
date Tue, 04 Sep 2007 21:40:59 +0000
parents eed0e69910d6
children 9b1d709095f9
files src/w32fns.c
diffstat 1 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32fns.c	Tue Sep 04 21:39:01 2007 +0000
+++ b/src/w32fns.c	Tue Sep 04 21:40:59 2007 +0000
@@ -3383,17 +3383,21 @@
       return 0;
 
     case WM_MOUSEWHEEL:
-      wmsg.dwModifiers = w32_get_modifiers ();
-      my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
-      signal_user_input ();
-      return 0;
-
     case WM_DROPFILES:
       wmsg.dwModifiers = w32_get_modifiers ();
       my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
       signal_user_input ();
       return 0;
 
+    case WM_MOUSEHWHEEL:
+      wmsg.dwModifiers = w32_get_modifiers ();
+      my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
+      signal_user_input ();
+      /* Non-zero must be returned when WM_MOUSEHWHEEL messages are
+         handled, to prevent the system trying to handle it by faking
+         scroll bar events.  */
+      return 1;
+
     case WM_TIMER:
       /* Flush out saved messages if necessary. */
       if (wParam == mouse_button_timer)
@@ -7238,7 +7242,7 @@
   Vx_resource_name = Vinvocation_name;
 
 #ifdef MULTI_KBOARD
-  kb = dpyinfo->kboard;
+  kb = dpyinfo->terminal->kboard;
 #else
   kb = &the_only_kboard;
 #endif