Commit 3618011a authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist

The state field should represent the state before the event, like on X11.

2005-03-30  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (build_pointer_event_state): The
	state field should represent the state before the event, like on
	X11. (#169753)
parent b4a04f55
2005-03-30 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkevents-win32.c (build_pointer_event_state): The
state field should represent the state before the event, like on
X11. (#169753)
2005-03-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_set_visible_func):
......
2005-03-30 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkevents-win32.c (build_pointer_event_state): The
state field should represent the state before the event, like on
X11. (#169753)
2005-03-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_set_visible_func):
......
2005-03-30 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkevents-win32.c (build_pointer_event_state): The
state field should represent the state before the event, like on
X11. (#169753)
2005-03-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_set_visible_func):
......
......@@ -954,22 +954,41 @@ build_pointer_event_state (MSG *msg)
gint state;
state = 0;
if (msg->wParam & MK_CONTROL)
state |= GDK_CONTROL_MASK;
if (msg->wParam & MK_LBUTTON)
if ((msg->message != WM_LBUTTONDOWN &&
(msg->wParam & MK_LBUTTON)) ||
msg->message == WM_LBUTTONUP)
state |= GDK_BUTTON1_MASK;
if (msg->wParam & MK_MBUTTON)
if ((msg->message != WM_MBUTTONDOWN &&
(msg->wParam & MK_MBUTTON)) ||
msg->message == WM_MBUTTONUP)
state |= GDK_BUTTON2_MASK;
if (msg->wParam & MK_RBUTTON)
if ((msg->message != WM_RBUTTONDOWN &&
(msg->wParam & MK_RBUTTON)) ||
msg->message == WM_RBUTTONUP)
state |= GDK_BUTTON3_MASK;
if (msg->wParam & MK_XBUTTON1)
if (((msg->message != WM_XBUTTONDOWN || HIWORD (msg->wParam) != XBUTTON1) &&
(msg->wParam & MK_XBUTTON1)) ||
(msg->message == WM_XBUTTONUP && HIWORD (msg->wParam) == XBUTTON1))
state |= GDK_BUTTON4_MASK;
if (msg->wParam & MK_XBUTTON2)
if (((msg->message != WM_XBUTTONDOWN || HIWORD (msg->wParam) != XBUTTON2) &&
(msg->wParam & MK_XBUTTON2)) ||
(msg->message == WM_XBUTTONUP && HIWORD (msg->wParam) == XBUTTON2))
state |= GDK_BUTTON5_MASK;
if (msg->wParam & MK_SHIFT)
state |= GDK_SHIFT_MASK;
if (GetKeyState (VK_MENU) < 0)
state |= GDK_MOD1_MASK;
if (GetKeyState (VK_CAPITAL) & 0x1)
state |= GDK_LOCK_MASK;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment