aboutsummaryrefslogtreecommitdiff
path: root/src/slideshow.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-09-03 22:15:00 +0200
committerThomas White <taw@physics.org>2017-09-03 22:15:00 +0200
commitb31ade0db9cd85dab14ddd3cb525b7fd2de7778d (patch)
tree59cdc0217661f54b4a437865efb946bb659cf4f9 /src/slideshow.c
parent2c90cac08fb74e910a4833b01baee3d5db792f73 (diff)
Use new display/monitor API
Diffstat (limited to 'src/slideshow.c')
-rw-r--r--src/slideshow.c10
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);