app: update tests for new GDK/GIMP API

This only makes the tests build, though they still fail.
This commit is contained in:
Ell 2018-05-26 04:08:01 -04:00
parent 367399e5c0
commit 3673352c99
2 changed files with 8 additions and 7 deletions

View File

@ -208,6 +208,7 @@ gimp_test_synthesize_tool_button_event (GimpDisplayShell *shell,
GdkEvent *event = gdk_event_new (button_event_type);
GdkWindow *window = gtk_widget_get_window (GTK_WIDGET (shell->canvas));
GdkDisplay *display = gdk_window_get_display (window);
GdkSeat *seat = gdk_display_get_default_seat (display);
g_assert (button_event_type == GDK_BUTTON_PRESS ||
button_event_type == GDK_BUTTON_RELEASE);
@ -220,7 +221,7 @@ gimp_test_synthesize_tool_button_event (GimpDisplayShell *shell,
event->button.axes = NULL;
event->button.state = 0;
event->button.button = button;
event->button.device = gdk_display_get_core_pointer (display);
event->button.device = gdk_seat_get_pointer (seat);
event->button.x_root = -1;
event->button.y_root = -1;
@ -239,6 +240,7 @@ gimp_test_synthesize_tool_motion_event (GimpDisplayShell *shell,
GdkEvent *event = gdk_event_new (GDK_MOTION_NOTIFY);
GdkWindow *window = gtk_widget_get_window (GTK_WIDGET (shell->canvas));
GdkDisplay *display = gdk_window_get_display (window);
GdkSeat *seat = gdk_display_get_default_seat (display);
event->motion.window = g_object_ref (window);
event->motion.send_event = TRUE;
@ -248,7 +250,7 @@ gimp_test_synthesize_tool_motion_event (GimpDisplayShell *shell,
event->motion.axes = NULL;
event->motion.state = GDK_BUTTON1_MASK | modifiers;
event->motion.is_hint = FALSE;
event->motion.device = gdk_display_get_core_pointer (display);
event->motion.device = gdk_seat_get_pointer (seat);
event->motion.x_root = -1;
event->motion.y_root = -1;

View File

@ -114,7 +114,6 @@ tool_options_editor_updates (gconstpointer data)
GimpImageWindow *image_window = GIMP_IMAGE_WINDOW (toplevel);
GimpUIManager *ui_manager = gimp_image_window_get_ui_manager (image_window);
GtkWidget *dockable = gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (toplevel),
gimp_widget_get_monitor (toplevel),
NULL /*ui_manager*/,
toplevel,
@ -753,18 +752,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;
monitor = gdk_display_get_primary_monitor (gdk_display_get_default ());
dock = gimp_dock_with_window_new (gimp_dialog_factory_get_singleton (),
gdk_screen_get_default (),
0,
monitor,
FALSE /*toolbox*/);
toolbox = gimp_dock_with_window_new (gimp_dialog_factory_get_singleton (),
gdk_screen_get_default (),
0,
monitor,
TRUE /*toolbox*/);
dock_window = gimp_dock_window_from_dock (GIMP_DOCK (dock));
toolbox_window = gimp_dock_window_from_dock (GIMP_DOCK (toolbox));