mirror of https://github.com/GNOME/gimp.git
app/tests: use gdk_display_get_monitor_at_window in window_roles ui test
This works on Wayland, and uses the monitor the GIMP image window is shown on.
This commit is contained in:
parent
2ef1126e6b
commit
5018cba5cc
|
@ -682,13 +682,18 @@ repeatedly_switch_window_mode (gconstpointer data)
|
|||
static void
|
||||
window_roles (gconstpointer data)
|
||||
{
|
||||
GdkMonitor *monitor = NULL;
|
||||
GtkWidget *dock = NULL;
|
||||
GtkWidget *toolbox = NULL;
|
||||
GimpDockWindow *dock_window = NULL;
|
||||
GimpDockWindow *toolbox_window = NULL;
|
||||
Gimp *gimp = GIMP (data);
|
||||
GimpDisplay *display = GIMP_DISPLAY (gimp_get_display_iter (gimp)->data);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
GimpImageWindow *window = gimp_display_shell_get_window (shell);
|
||||
GdkMonitor *monitor = NULL;
|
||||
GtkWidget *dock = NULL;
|
||||
GtkWidget *toolbox = NULL;
|
||||
GimpDockWindow *dock_window = NULL;
|
||||
GimpDockWindow *toolbox_window = NULL;
|
||||
|
||||
monitor = gdk_display_get_monitor_at_window(gdk_display_get_default (), gtk_widget_get_window(GTK_WIDGET(window)));
|
||||
|
||||
monitor = gdk_display_get_primary_monitor (gdk_display_get_default ());
|
||||
dock = gimp_dock_with_window_new (gimp_dialog_factory_get_singleton (),
|
||||
monitor,
|
||||
FALSE /*toolbox*/);
|
||||
|
|
Loading…
Reference in New Issue