diff options
author | Thomas White <taw@physics.org> | 2017-09-03 22:15:00 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2017-09-03 22:15:00 +0200 |
commit | b31ade0db9cd85dab14ddd3cb525b7fd2de7778d (patch) | |
tree | 59cdc0217661f54b4a437865efb946bb659cf4f9 /src/slideshow.c | |
parent | 2c90cac08fb74e910a4833b01baee3d5db792f73 (diff) |
Use new display/monitor API
Diffstat (limited to 'src/slideshow.c')
-rw-r--r-- | src/slideshow.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/slideshow.c b/src/slideshow.c index b994f69..71e8d9a 100644 --- a/src/slideshow.c +++ b/src/slideshow.c @@ -151,7 +151,7 @@ void sc_slideshow_set_slide(SCSlideshow *ss, SCBlock *ns) SCSlideshow *sc_slideshow_new(struct presentation *p) { - GdkScreen *screen; + GdkDisplay *display; int n_monitors; int i; SCSlideshow *ss; @@ -186,14 +186,16 @@ SCSlideshow *sc_slideshow_new(struct presentation *p) gtk_widget_grab_focus(GTK_WIDGET(ss->drawingarea)); - screen = gdk_screen_get_default(); - n_monitors = gdk_screen_get_n_monitors(screen); + display = gdk_display_get_default(); + n_monitors = gdk_display_get_n_monitors(display); for ( i=0; i<n_monitors; i++ ) { + GdkMonitor *monitor; GdkRectangle rect; int w; - gdk_screen_get_monitor_geometry(screen, i, &rect); + monitor = gdk_display_get_monitor(display, i); + gdk_monitor_get_geometry(monitor,&rect); snprintf(ss->geom, 255, "%ix%i+%i+%i", rect.width, rect.height, rect.x, rect.y); |