[gtk/gtk-3-24: 3/4] tests/animated-resizing: Remove deprecated functions
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 3/4] tests/animated-resizing: Remove deprecated functions
- Date: Fri, 20 Jul 2018 14:09:50 +0000 (UTC)
commit db7f0853159fdfb639afe4bfdaba6e938e74cc5a
Author: Yi-Soo An <yisooan gmail com>
Date: Fri Jul 20 15:42:26 2018 +0900
tests/animated-resizing: Remove deprecated functions
The functions as below are deprecated
- gdk_screen_get_monitor_geometry
- gdk_screen_get_primary_monitor
Instead of them, use functions below
- gdk_monitor_get_geometry
- gdk_display_get_primary_monitor
tests/animated-resizing.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/tests/animated-resizing.c b/tests/animated-resizing.c
index 8660089276..d11d6e0dee 100644
--- a/tests/animated-resizing.c
+++ b/tests/animated-resizing.c
@@ -168,7 +168,7 @@ int
main(int argc, char **argv)
{
GError *error = NULL;
- GdkScreen *screen;
+ GdkMonitor *monitor;
GdkRectangle monitor_bounds;
GOptionContext *context = g_option_context_new (NULL);
@@ -204,10 +204,8 @@ main(int argc, char **argv)
G_CALLBACK (on_map_event), NULL);
on_frame (0.);
- screen = gtk_widget_get_screen (window);
- gdk_screen_get_monitor_geometry (screen,
- gdk_screen_get_primary_monitor (screen),
- &monitor_bounds);
+ monitor = gdk_display_get_primary_monitor (gtk_widget_get_display (window));
+ gdk_monitor_get_geometry (monitor, &monitor_bounds);
gtk_window_move (GTK_WINDOW (window),
monitor_bounds.x + (monitor_bounds.width - window_width) / 2,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]