]> Pileus Git - ~andy/gtk/commitdiff
Drop the support for the MSH_MOUSEWHEEL message that MSDN says is used
authorTor Lillqvist <tml@novell.com>
Fri, 14 Mar 2008 16:11:50 +0000 (16:11 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Fri, 14 Mar 2008 16:11:50 +0000 (16:11 +0000)
2008-03-14  Tor Lillqvist  <tml@novell.com>

* gdk/win32/gdkevents-win32.c: Drop the support for the
MSH_MOUSEWHEEL message that MSDN says is used only on NT 3.51 and
Win95. Thanks to mitch for noticing this obsolete code.

svn path=/trunk/; revision=19874

ChangeLog
gdk/win32/gdkevents-win32.c

index 56301d62ff1c858e956ac4db2f75cbd12df508ad..154a7bf1cf9a997efc8e8c8f7870d9a6e6b2f1d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-14  Tor Lillqvist  <tml@novell.com>
+
+       * gdk/win32/gdkevents-win32.c: Drop the support for the
+       MSH_MOUSEWHEEL message that MSDN says is used only on NT 3.51 and
+       Win95. Thanks to mitch for noticing this obsolete code.
+
 2008-03-14  Cody Russell  <bratsche@gnome.org>
 
        * examples/scribble-xinput/scribble-xinput.c: Changed
index 8aa7c2125d3f63987e08fc2513ae9b99224f1c0e..7841171620de142f5789019166fe3cec51e60918 100644 (file)
@@ -128,7 +128,6 @@ GPollFD event_poll_fd;
 static GdkWindow *current_window = NULL;
 static gint current_x, current_y;
 static gint current_root_x, current_root_y;
-static UINT msh_mousewheel;
 static UINT client_message;
 
 static UINT got_gdk_events_message;
@@ -345,13 +344,6 @@ _gdk_events_init (void)
   };
 #endif
 
-  /* This is the string MSH_MOUSEWHEEL from zmouse.h,
-   * http://www.microsoft.com/mouse/intellimouse/sdk/zmouse.h
-   * This message is used by mouse drivers than cannot generate WM_MOUSEWHEEL
-   * or on Win95.
-   */
-  msh_mousewheel = RegisterWindowMessage ("MSWHEEL_ROLLMSG");
-
   client_message = RegisterWindowMessage ("GDK_WIN32_CLIENT_MESSAGE");
   got_gdk_events_message = RegisterWindowMessage ("GDK_WIN32_GOT_EVENTS");
 
@@ -2182,54 +2174,7 @@ gdk_event_translate (MSG  *msg,
        }
     }
 
-  if (msg->message == msh_mousewheel)
-    {
-      GDK_NOTE (EVENTS, g_print (" (MSH_MOUSEWHEEL)"));
-      
-      /* MSH_MOUSEWHEEL is delivered to the foreground window.  Work
-       * around that. Also, the position is in screen coordinates, not
-       * client coordinates as with the button messages.
-       */
-      point.x = GET_X_LPARAM (msg->lParam);
-      point.y = GET_Y_LPARAM (msg->lParam);
-      if ((hwnd = WindowFromPoint (point)) == NULL)
-       goto done;
-
-      msg->hwnd = hwnd;
-      if ((new_window = gdk_win32_handle_table_lookup ((GdkNativeWindow) msg->hwnd)) == NULL)
-       goto done;
-
-      assign_object (&window, new_window);
-
-      if (!propagate (&window, msg,
-                     p_grab_window, p_grab_owner_events, p_grab_mask,
-                     doesnt_want_scroll, TRUE))
-       goto done;
-
-      if (GDK_WINDOW_DESTROYED (window))
-       goto done;
-
-      ScreenToClient (msg->hwnd, &point);
-
-      event = gdk_event_new (GDK_SCROLL);
-      event->scroll.window = window;
-      event->scroll.direction = ((int) msg->wParam > 0) ?
-       GDK_SCROLL_UP : GDK_SCROLL_DOWN;
-      event->scroll.time = _gdk_win32_get_next_tick (msg->time);
-      _gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
-      event->scroll.x = (gint16) point.x + xoffset;
-      event->scroll.y = (gint16) point.y + yoffset;
-      event->scroll.x_root = (gint16) GET_X_LPARAM (msg->lParam) + _gdk_offset_x;
-      event->scroll.y_root = (gint16) GET_Y_LPARAM (msg->lParam) + _gdk_offset_y;
-      event->scroll.state = 0; /* No state information with MSH_MOUSEWHEEL */
-      event->scroll.device = _gdk_display->core_pointer;
-
-      append_event (event);
-
-      return_val = TRUE;
-      goto done;
-    }
-  else if (msg->message == client_message)
+  if (msg->message == client_message)
     {
       GList *tmp_list;
       GdkFilterReturn result = GDK_FILTER_CONTINUE;