diff options
author | ZenWalker <[email protected]> | 2017-08-11 02:51:02 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-08-18 08:16:06 +0200 |
commit | f0541e3dfda29c26fe14c9c9117f95c49006c75c (patch) | |
tree | b940028b4eeec173a8697ccf3bb79089a638d32f /src/wm-tester | |
parent | d18c2fb4acb58c408c01700682b9922de86e8b2f (diff) | |
download | marco-f0541e3dfda29c26fe14c9c9117f95c49006c75c.tar.bz2 marco-f0541e3dfda29c26fe14c9c9117f95c49006c75c.tar.xz |
avoid deprecated gdk_screen_width/height
Diffstat (limited to 'src/wm-tester')
-rw-r--r-- | src/wm-tester/main.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/wm-tester/main.c b/src/wm-tester/main.c index 5a700955..b1cfac6f 100644 --- a/src/wm-tester/main.c +++ b/src/wm-tester/main.c @@ -117,14 +117,16 @@ evil_timeout (gpointer data) GtkWidget *c; int t; GtkWidget *parent; + int sc_width, sc_height; + + gdk_window_get_geometry (gdk_screen_get_root_window (gdk_screen_get_default()), + NULL, NULL, &sc_width, &sc_height); w = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_move (GTK_WINDOW (w), - g_random_int_range (0, - gdk_screen_width ()), - g_random_int_range (0, - gdk_screen_height ())); + g_random_int_range (0, sc_width), + g_random_int_range (0, sc_height)); parent = NULL; |