[gtk+] quartz: Remove remaining uses of GdkScreen
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] quartz: Remove remaining uses of GdkScreen
- Date: Fri, 17 Nov 2017 18:55:07 +0000 (UTC)
commit 0b8c88f7d6a0d711af230912809f99b55f4426a4
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Nov 17 13:43:53 2017 -0500
quartz: Remove remaining uses of GdkScreen
gdk/quartz/gdkdevice-core-quartz.c | 12 ++----------
gdk/quartz/gdkdisplay-quartz.c | 2 +-
gdk/quartz/gdkdisplay-quartz.h | 10 ----------
gdk/quartz/gdkglobals-quartz.c | 3 ++-
gdk/quartz/gdkprivate-quartz.h | 9 ++++-----
gdk/quartz/gdkwindow-quartz.c | 3 +--
6 files changed, 10 insertions(+), 29 deletions(-)
---
diff --git a/gdk/quartz/gdkdevice-core-quartz.c b/gdk/quartz/gdkdevice-core-quartz.c
index 333d9f3..e31ad6d 100644
--- a/gdk/quartz/gdkdevice-core-quartz.c
+++ b/gdk/quartz/gdkdevice-core-quartz.c
@@ -179,7 +179,6 @@ gdk_quartz_device_core_set_window_cursor (GdkDevice *device,
static void
gdk_quartz_device_core_warp (GdkDevice *device,
- GdkScreen *screen,
gdouble x,
gdouble y)
{
@@ -324,25 +323,18 @@ gdk_quartz_device_core_window_at_position (GdkDevice *device,
GdkModifierType *mask,
gboolean get_toplevel)
{
- GdkDisplay *display;
- GdkScreen *screen;
GdkWindow *found_window;
NSPoint point;
gint x_tmp, y_tmp;
- display = _gdk_display;
- screen = _gdk_screen;
-
/* Get mouse coordinates, find window under the mouse pointer */
point = [NSEvent mouseLocation];
_gdk_quartz_window_nspoint_to_gdk_xy (point, &x_tmp, &y_tmp);
- found_window = _gdk_quartz_window_find_child (_gdk_root, x_tmp, y_tmp,
- get_toplevel);
+ found_window = _gdk_quartz_window_find_child (_gdk_root, x_tmp, y_tmp, get_toplevel);
if (found_window)
- translate_coords_to_child_coords (_gdk_root, found_window,
- &x_tmp, &y_tmp);
+ translate_coords_to_child_coords (_gdk_root, found_window, &x_tmp, &y_tmp);
if (win_x)
*win_x = found_window ? x_tmp : -1;
diff --git a/gdk/quartz/gdkdisplay-quartz.c b/gdk/quartz/gdkdisplay-quartz.c
index 89c8266..4567e5b 100644
--- a/gdk/quartz/gdkdisplay-quartz.c
+++ b/gdk/quartz/gdkdisplay-quartz.c
@@ -62,7 +62,7 @@ _gdk_quartz_display_open (const gchar *display_name)
_gdk_screen = g_object_new (gdk_quartz_screen_get_type (), NULL);
- _gdk_quartz_window_init_windowing (_gdk_display, _gdk_screen);
+ _gdk_quartz_window_init_windowing (_gdk_display);
_gdk_quartz_events_init ();
diff --git a/gdk/quartz/gdkdisplay-quartz.h b/gdk/quartz/gdkdisplay-quartz.h
index 977ac4a..6738c27 100644
--- a/gdk/quartz/gdkdisplay-quartz.h
+++ b/gdk/quartz/gdkdisplay-quartz.h
@@ -65,7 +65,6 @@ void _gdk_quartz_display_after_process_all_updates (GdkDisplay *display);
void _gdk_quartz_display_create_window_impl (GdkDisplay *display,
GdkWindow *window,
GdkWindow *real_parent,
- GdkScreen *screen,
GdkEventMask event_mask,
GdkWindowAttr *attributes);
@@ -98,16 +97,7 @@ gint _gdk_quartz_display_text_property_to_utf8_list (GdkDisplay *disp
gchar ***list);
gchar * _gdk_quartz_display_utf8_to_string_target (GdkDisplay *displayt,
const gchar *str);
-/*
-GdkScreen *_gdk_x11_display_screen_for_xrootwin (GdkDisplay *display,
- Window xrootwin);
-void _gdk_x11_display_error_event (GdkDisplay *display,
- XErrorEvent *error);
-GdkFilterReturn _gdk_wm_protocols_filter (GdkXEvent *xev,
- GdkEvent *event,
- gpointer data);
-*/
G_END_DECLS
#endif /* __GDK_QUARTZ_DISPLAY__ */
diff --git a/gdk/quartz/gdkglobals-quartz.c b/gdk/quartz/gdkglobals-quartz.c
index a2b5fbd..4fb7dc9 100644
--- a/gdk/quartz/gdkglobals-quartz.c
+++ b/gdk/quartz/gdkglobals-quartz.c
@@ -19,9 +19,10 @@
#include "config.h"
#include "gdktypes.h"
#include "gdkquartz.h"
+#include "gdkscreen-quartz.h"
GdkDisplay *_gdk_display = NULL;
-GdkScreen *_gdk_screen = NULL;
+GdkQuartzScreen *_gdk_screen = NULL;
GdkWindow *_gdk_root = NULL;
GdkOSXVersion
diff --git a/gdk/quartz/gdkprivate-quartz.h b/gdk/quartz/gdkprivate-quartz.h
index 2e147a9..cfad398 100644
--- a/gdk/quartz/gdkprivate-quartz.h
+++ b/gdk/quartz/gdkprivate-quartz.h
@@ -35,7 +35,7 @@
#include "config.h"
extern GdkDisplay *_gdk_display;
-extern GdkScreen *_gdk_screen;
+extern GdkQuartzScreen *_gdk_screen;
extern GdkWindow *_gdk_root;
extern GdkDragContext *_gdk_quartz_drag_source_context;
@@ -43,8 +43,7 @@ extern GdkDragContext *_gdk_quartz_drag_source_context;
#define GDK_WINDOW_IS_QUARTZ(win) (GDK_IS_WINDOW_IMPL_QUARTZ (((GdkWindow *)win)->impl))
/* Initialization */
-void _gdk_quartz_window_init_windowing (GdkDisplay *display,
- GdkScreen *screen);
+void _gdk_quartz_window_init_windowing (GdkDisplay *display);
void _gdk_quartz_events_init (void);
void _gdk_quartz_event_loop_init (void);
@@ -89,8 +88,8 @@ GdkDisplay * _gdk_quartz_display_open (const gchar *name);
/* Screen */
-GdkScreen *_gdk_quartz_screen_new (void);
-void _gdk_quartz_screen_update_window_sizes (GdkScreen *screen);
+GdkQuartzScreen *_gdk_quartz_screen_new (void);
+void _gdk_quartz_screen_update_window_sizes (GdkQuartzScreen *screen);
/* Screen methods - events */
gboolean _gdk_quartz_get_setting (const gchar *name,
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index ad11cc1..1d5982b 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -875,8 +875,7 @@ _gdk_quartz_window_update_position (GdkWindow *window)
}
void
-_gdk_quartz_window_init_windowing (GdkDisplay *display,
- GdkScreen *screen)
+_gdk_quartz_window_init_windowing (GdkDisplay *display)
{
GdkWindowImplQuartz *impl;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]