[gtk+/client-side-windows: 235/284] Remove tracking of "current mouse window", this is handled in the common code now
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+/client-side-windows: 235/284] Remove tracking of "current mouse window", this is handled in the common code now
- Date: Thu, 2 Apr 2009 14:19:40 -0400 (EDT)
commit 77ee2feda22448a1a19e8928aa54f60d9c7a0217
Author: Richard Hult <richard imendio com>
Date: Mon Feb 2 19:50:51 2009 +0100
Remove tracking of "current mouse window", this is handled in the common code now
---
gdk/quartz/gdkevents-quartz.c | 92 ----------------------------------------
gdk/quartz/gdkprivate-quartz.h | 2 -
2 files changed, 0 insertions(+), 94 deletions(-)
diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
index 1054098..f3ddc3b 100644
--- a/gdk/quartz/gdkevents-quartz.c
+++ b/gdk/quartz/gdkevents-quartz.c
@@ -33,9 +33,6 @@
#include "gdkkeysyms.h"
#include "gdkprivate-quartz.h"
-/* This is the window the mouse is currently over */
-static GdkWindow *current_mouse_window;
-
/* This is the window corresponding to the key window */
static GdkWindow *current_keyboard_window;
@@ -63,38 +60,6 @@ static void get_converted_window_coordinates (GdkWindow *in_window,
gint *out_y);
static void append_event (GdkEvent *event);
-static const gchar *
-which_window_is_this (GdkWindow *window)
-{
- static gchar buf[256];
- const gchar *name = NULL;
- gpointer widget;
-
- /* Get rid of compiler warning. */
- if (0) which_window_is_this (window);
-
- if (window == _gdk_root)
- name = "root";
- else if (window == NULL)
- name = "null";
-
- if (window)
- {
- gdk_window_get_user_data (window, &widget);
- if (widget)
- name = G_OBJECT_TYPE_NAME (widget);
- }
-
- if (!name)
- name = "unknown";
-
- snprintf (buf, 256, "<%s (%p)%s>",
- name, window,
- window == current_mouse_window ? ", is mouse" : "");
-
- return buf;
-}
-
NSEvent *
gdk_quartz_event_get_nsevent (GdkEvent *event)
{
@@ -107,7 +72,6 @@ _gdk_events_init (void)
{
_gdk_quartz_event_loop_init ();
- current_mouse_window = g_object_ref (_gdk_root);
current_keyboard_window = g_object_ref (_gdk_root);
}
@@ -476,42 +440,6 @@ _gdk_quartz_events_send_map_event (GdkWindow *window)
}
}
-/* Get current mouse window */
-GdkWindow *
-_gdk_quartz_events_get_mouse_window (gboolean consider_grabs)
-{
- GdkPointerGrabInfo *grab;
-
- if (!consider_grabs)
- return current_mouse_window;
-
- grab = _gdk_display_get_last_pointer_grab (_gdk_display);
- if (grab && grab->window && !grab->owner_events)
- return grab->window;
-
- return current_mouse_window;
-}
-
-/* Update mouse window */
-void
-_gdk_quartz_events_update_mouse_window (GdkWindow *window)
-{
- if (window == current_mouse_window)
- return;
-
-#ifdef G_ENABLE_DEBUG
- if (_gdk_debug_flags & GDK_DEBUG_EVENTS)
- _gdk_quartz_window_debug_highlight (window, 0);
-#endif /* G_ENABLE_DEBUG */
-
- if (window)
- g_object_ref (window);
- if (current_mouse_window)
- g_object_unref (current_mouse_window);
-
- current_mouse_window = window;
-}
-
/* Translates coordinates from an ancestor window + coords, to
* coordinates that are relative the child window.
*/
@@ -658,12 +586,6 @@ _gdk_quartz_events_trigger_crossing_events (gboolean defer_to_mainloop)
toplevel = gdk_window_get_toplevel (mouse_window);
- /* We ignore crossing within the same toplevel since that is already
- * handled elsewhere.
- */
- if (toplevel == gdk_window_get_toplevel (current_mouse_window))
- return;
-
get_converted_window_coordinates (_gdk_root,
x, y,
toplevel,
@@ -1117,12 +1039,6 @@ synthesize_crossing_event (GdkWindow *window,
private = GDK_WINDOW_OBJECT (window);
- /* FIXME: had this before csw:
- _gdk_quartz_events_update_mouse_window (window);
- if (window && !_gdk_quartz_pointer_grab_window)
- _gdk_quartz_events_update_cursor (window);
- */
-
switch ([nsevent type])
{
case NSMouseEntered:
@@ -1151,14 +1067,6 @@ synthesize_crossing_event (GdkWindow *window,
if (!(private->event_mask & GDK_LEAVE_NOTIFY_MASK))
return FALSE;
- /*if (!mouse_window ||
- gdk_window_get_toplevel (mouse_window) ==
- gdk_window_get_toplevel (current_mouse_window))
- {
- mouse_window = _gdk_root;
- }
- */
-
fill_crossing_event (window, event, nsevent,
x, y,
x_root, y_root,
diff --git a/gdk/quartz/gdkprivate-quartz.h b/gdk/quartz/gdkprivate-quartz.h
index e56e1c2..b90114f 100644
--- a/gdk/quartz/gdkprivate-quartz.h
+++ b/gdk/quartz/gdkprivate-quartz.h
@@ -157,8 +157,6 @@ typedef enum {
void _gdk_quartz_events_update_focus_window (GdkWindow *new_window,
gboolean got_focus);
-GdkWindow * _gdk_quartz_events_get_mouse_window (gboolean consider_grabs);
-void _gdk_quartz_events_update_mouse_window (GdkWindow *window);
void _gdk_quartz_events_send_map_event (GdkWindow *window);
GdkEventMask _gdk_quartz_events_get_current_event_mask (void);
void _gdk_quartz_events_trigger_crossing_events(gboolean defer_to_mainloop);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]