diff options
author | ZenWalker <[email protected]> | 2017-08-16 03:44:22 +0200 |
---|---|---|
committer | ZenWalker <[email protected]> | 2017-08-16 03:44:22 +0200 |
commit | 543dfb8b220f6c5f17e82455b1ef7eda4b8eb0b2 (patch) | |
tree | b5be98d1004e17c289d00d40f8895933da203c82 /mate-volume-control | |
parent | 4847aee768a4c280688db5e23b82f92810e7ed2f (diff) | |
download | mate-media-543dfb8b220f6c5f17e82455b1ef7eda4b8eb0b2.tar.bz2 mate-media-543dfb8b220f6c5f17e82455b1ef7eda4b8eb0b2.tar.xz |
gtk 3.22: avoid deprecated gdk_screen_get_monitor... functions:
avoid deprecated:
gdk_screen_get_monitor_geometry
gdk_screen_get_monitor_at_point
Diffstat (limited to 'mate-volume-control')
-rw-r--r-- | mate-volume-control/gvc-stream-status-icon.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mate-volume-control/gvc-stream-status-icon.c b/mate-volume-control/gvc-stream-status-icon.c index e80d4fe..e103a37 100644 --- a/mate-volume-control/gvc-stream-status-icon.c +++ b/mate-volume-control/gvc-stream-status-icon.c @@ -70,7 +70,11 @@ popup_dock (GvcStreamStatusIcon *icon, guint time) GdkScreen *screen; int x; int y; +#if GTK_CHECK_VERSION (3, 22, 0) + GdkMonitor *monitor_num; +#else int monitor_num; +#endif GdkRectangle monitor; GtkRequisition dock_req; @@ -89,8 +93,13 @@ popup_dock (GvcStreamStatusIcon *icon, guint time) gvc_channel_bar_set_orientation (GVC_CHANNEL_BAR (icon->priv->bar), 1 - orientation); +#if GTK_CHECK_VERSION (3, 22, 0) + monitor_num = gdk_display_get_monitor_at_point (gdk_screen_get_display (screen), area.x, area.y); + gdk_monitor_get_geometry (monitor_num, &monitor); +#else monitor_num = gdk_screen_get_monitor_at_point (screen, area.x, area.y); gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor); +#endif gtk_container_foreach (GTK_CONTAINER (icon->priv->dock), (GtkCallback) gtk_widget_show_all, NULL); |