forked from AuroraMiddleware/gtk
win32: factor out on_displaychange_event method for the screen
This allows us to make more initialization methods private to the screen object.
This commit is contained in:
parent
48d693ea80
commit
41a371c435
@ -178,10 +178,6 @@ inner_display_change_window_procedure (HWND hwnd,
|
||||
{
|
||||
GdkWin32Display *win32_display = GDK_WIN32_DISPLAY (_gdk_display);
|
||||
|
||||
_gdk_screen_init_monitors (GDK_WIN32_SCREEN (win32_display->screen));
|
||||
_gdk_screen_init_root_window_size (GDK_WIN32_SCREEN (win32_display->screen));
|
||||
g_signal_emit_by_name (win32_display->screen, "size_changed");
|
||||
|
||||
return 0;
|
||||
}
|
||||
default:
|
||||
|
@ -509,6 +509,7 @@ void _gdk_win32_window_delete_property (GdkWindow *window, GdkAtom property);
|
||||
|
||||
/* Stray GdkWin32Screen members */
|
||||
gboolean _gdk_win32_screen_get_setting (GdkScreen *screen, const gchar *name, GValue *value);
|
||||
void _gdk_win32_screen_on_displaychange_event (GdkWin32Screen *screen);
|
||||
|
||||
/* Distributed display manager implementation */
|
||||
GdkDisplay *_gdk_win32_display_open (const gchar *display_name);
|
||||
@ -524,8 +525,6 @@ guint32 _gdk_win32_keymap_get_decimal_mark (void);
|
||||
|
||||
/* Initialization */
|
||||
void _gdk_win32_windowing_init (void);
|
||||
void _gdk_screen_init_monitors (GdkWin32Screen *screen);
|
||||
void _gdk_screen_init_root_window_size (GdkWin32Screen *screen);
|
||||
void _gdk_dnd_init (void);
|
||||
void _gdk_events_init (void);
|
||||
void _gdk_input_wintab_init_check (GdkDeviceManager *device_manager);
|
||||
|
@ -256,8 +256,8 @@ init_visual (GdkScreen *screen,
|
||||
return visual;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_screen_init_root_window_size (GdkWin32Screen *screen)
|
||||
static void
|
||||
init_root_window_size (GdkWin32Screen *screen)
|
||||
{
|
||||
GdkRectangle rect;
|
||||
int i;
|
||||
@ -294,13 +294,13 @@ init_root_window (GdkWin32Screen *screen_win32)
|
||||
|
||||
screen_win32->root_window = window;
|
||||
|
||||
_gdk_screen_init_root_window_size (screen_win32);
|
||||
init_root_window_size (screen_win32);
|
||||
|
||||
window->x = 0;
|
||||
window->y = 0;
|
||||
window->abs_x = 0;
|
||||
window->abs_y = 0;
|
||||
/* width and height already initialised in _gdk_screen_init_root_window_size() */
|
||||
/* width and height already initialised in init_root_window_size() */
|
||||
window->viewable = TRUE;
|
||||
|
||||
gdk_win32_handle_table_insert ((HANDLE *) &impl_win32->handle, window);
|
||||
@ -387,8 +387,8 @@ enum_monitor (HMONITOR hmonitor,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_screen_init_monitors (GdkWin32Screen *screen)
|
||||
static void
|
||||
init_monitors (GdkWin32Screen *screen)
|
||||
{
|
||||
gint count;
|
||||
EnumMonitorData data;
|
||||
@ -461,14 +461,21 @@ gdk_win32_screen_init (GdkWin32Screen *win32_screen)
|
||||
win32_screen->available_visual_depths[0] = win32_screen->rgba_visual->depth;
|
||||
win32_screen->available_visual_types[0] = win32_screen->rgba_visual->type;
|
||||
|
||||
_gdk_screen_init_monitors (win32_screen);
|
||||
|
||||
init_monitors (win32_screen);
|
||||
init_root_window (win32_screen);
|
||||
|
||||
/* On Windows 8 and later, DWM (composition) is always enabled */
|
||||
win32_screen->always_composited = g_win32_check_windows_version (6, 2, 0, G_WIN32_OS_ANY);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_win32_screen_on_displaychange_event (GdkWin32Screen *screen)
|
||||
{
|
||||
init_monitors (screen);
|
||||
init_root_window_size (screen);
|
||||
g_signal_emit_by_name (screen, "size-changed");
|
||||
}
|
||||
|
||||
static GdkDisplay *
|
||||
gdk_win32_screen_get_display (GdkScreen *screen)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user