quartz: Remove remaining uses of GdkScreen

This commit is contained in:
Matthias Clasen 2017-11-17 13:43:53 -05:00
parent a62e75964c
commit 0b8c88f7d6
6 changed files with 10 additions and 29 deletions

View File

@ -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;

View File

@ -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 ();

View File

@ -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__ */

View File

@ -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

View File

@ -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,

View File

@ -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;