[gtk+/client-side-windows: 234/284] Remove old cursor setting and make it work with client-side windows
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+/client-side-windows: 234/284] Remove old cursor setting and make it work with client-side windows
- Date: Thu, 2 Apr 2009 14:19:35 -0400 (EDT)
commit 3c7a37d10d906b58abbea6e398a5e1449f86ed6a
Author: Richard Hult <richard imendio com>
Date: Mon Feb 2 19:45:41 2009 +0100
Remove old cursor setting and make it work with client-side windows
---
gdk/quartz/gdkevents-quartz.c | 29 -----------------------------
gdk/quartz/gdkprivate-quartz.h | 1 -
gdk/quartz/gdkwindow-quartz.c | 32 +++-----------------------------
gdk/quartz/gdkwindow-quartz.h | 2 --
4 files changed, 3 insertions(+), 61 deletions(-)
diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
index 23c1b6f..1054098 100644
--- a/gdk/quartz/gdkevents-quartz.c
+++ b/gdk/quartz/gdkevents-quartz.c
@@ -512,35 +512,6 @@ _gdk_quartz_events_update_mouse_window (GdkWindow *window)
current_mouse_window = window;
}
-/* Update current cursor */
-void
-_gdk_quartz_events_update_cursor (GdkWindow *window)
-{
- GdkWindowObject *private = GDK_WINDOW_OBJECT (window);
- NSCursor *nscursor = nil;
-
- while (private)
- {
- GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);
-
- nscursor = impl->nscursor;
- if (nscursor)
- break;
-
- private = private->parent;
- }
-
- GDK_QUARTZ_ALLOC_POOL;
-
- if (!nscursor)
- nscursor = [NSCursor arrowCursor];
-
- if ([NSCursor currentCursor] != nscursor)
- [nscursor set];
-
- GDK_QUARTZ_RELEASE_POOL;
-}
-
/* Translates coordinates from an ancestor window + coords, to
* coordinates that are relative the child window.
*/
diff --git a/gdk/quartz/gdkprivate-quartz.h b/gdk/quartz/gdkprivate-quartz.h
index b942c0e..e56e1c2 100644
--- a/gdk/quartz/gdkprivate-quartz.h
+++ b/gdk/quartz/gdkprivate-quartz.h
@@ -159,7 +159,6 @@ 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_update_cursor (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);
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 814bcac..9164261 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -185,9 +185,6 @@ gdk_window_impl_quartz_finalize (GObject *object)
check_grab_destroy (GDK_DRAWABLE_IMPL_QUARTZ (object)->wrapper);
- if (impl->nscursor)
- [impl->nscursor release];
-
if (impl->paint_clip_region)
gdk_region_destroy (impl->paint_clip_region);
@@ -974,7 +971,6 @@ _gdk_quartz_window_destroy (GdkWindow *window,
GdkWindowObject *private;
GdkWindowImplQuartz *impl;
GdkWindowObject *parent;
- GdkWindow *mouse_window;
private = GDK_WINDOW_OBJECT (window);
impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);
@@ -994,11 +990,6 @@ _gdk_quartz_window_destroy (GdkWindow *window,
_gdk_quartz_drawable_finish (GDK_DRAWABLE (impl));
- mouse_window = _gdk_quartz_events_get_mouse_window (FALSE);
- if (window == mouse_window ||
- _gdk_quartz_window_is_ancestor (window, mouse_window))
- _gdk_quartz_events_update_mouse_window (_gdk_root);
-
if (!recursing && !foreign_destroy)
{
GDK_QUARTZ_ALLOC_POOL;
@@ -1123,7 +1114,6 @@ gdk_window_quartz_hide (GdkWindow *window)
{
GdkWindowObject *private = (GdkWindowObject *)window;
GdkWindowImplQuartz *impl;
- GdkWindow *mouse_window;
/* Make sure we're not stuck in fullscreen mode. */
if (get_fullscreen_geometry (window))
@@ -1131,11 +1121,6 @@ gdk_window_quartz_hide (GdkWindow *window)
check_grab_unmap (window);
- mouse_window = _gdk_quartz_events_get_mouse_window (FALSE);
- if (window == mouse_window ||
- _gdk_quartz_window_is_ancestor (window, mouse_window))
- _gdk_quartz_events_update_mouse_window (_gdk_root);
-
_gdk_window_clear_update_area (window);
impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);
@@ -1567,31 +1552,20 @@ static void
gdk_window_quartz_set_cursor (GdkWindow *window,
GdkCursor *cursor)
{
- GdkWindowImplQuartz *impl;
GdkCursorPrivate *cursor_private;
NSCursor *nscursor;
- impl = GDK_WINDOW_IMPL_QUARTZ (GDK_WINDOW_OBJECT (window)->impl);
cursor_private = (GdkCursorPrivate *)cursor;
if (GDK_WINDOW_DESTROYED (window))
return;
- GDK_QUARTZ_ALLOC_POOL;
-
if (!cursor)
- nscursor = NULL;
+ nscursor = [NSCursor arrowCursor];
else
- nscursor = [cursor_private->nscursor retain];
-
- if (impl->nscursor)
- [impl->nscursor release];
-
- impl->nscursor = nscursor;
-
- GDK_QUARTZ_RELEASE_POOL;
+ nscursor = cursor_private->nscursor;
- _gdk_quartz_events_update_cursor (_gdk_quartz_events_get_mouse_window (TRUE));
+ [nscursor set];
}
static void
diff --git a/gdk/quartz/gdkwindow-quartz.h b/gdk/quartz/gdkwindow-quartz.h
index 9f63a0a..89f2ec0 100644
--- a/gdk/quartz/gdkwindow-quartz.h
+++ b/gdk/quartz/gdkwindow-quartz.h
@@ -51,8 +51,6 @@ struct _GdkWindowImplQuartz
GdkWindowTypeHint type_hint;
- NSCursor *nscursor;
-
GdkRegion *paint_clip_region;
gint begin_paint_count;
gint in_paint_rect_count;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]