[gnome-flashback] shell: avoid deprecated gdk_screen_get_monitor_workarea
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] shell: avoid deprecated gdk_screen_get_monitor_workarea
- Date: Thu, 28 Sep 2017 16:18:46 +0000 (UTC)
commit ec91fa998b46035b611ffc0cb5f8854e0dd0b385
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu Sep 28 18:52:40 2017 +0300
shell: avoid deprecated gdk_screen_get_monitor_workarea
configure.ac | 2 +-
gnome-flashback/libshell/gf-label-window.c | 8 +++++---
gnome-flashback/libshell/gf-osd-window.c | 8 +++++---
3 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7474a78..3535a7f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,7 +88,7 @@ dnl Check for required packages
dnl **************************************************************************
GDK_PIXBUF_REQUIRED=2.32.2
-GTK_REQUIRED=3.19.5
+GTK_REQUIRED=3.22.0
LIBGNOME_DESKTOP_REQUIRED=3.12.0
CANBERRA_REQUIRED=0.13
GLIB_REQUIRED=2.44.0
diff --git a/gnome-flashback/libshell/gf-label-window.c b/gnome-flashback/libshell/gf-label-window.c
index 0612643..61cc964 100644
--- a/gnome-flashback/libshell/gf-label-window.c
+++ b/gnome-flashback/libshell/gf-label-window.c
@@ -90,17 +90,19 @@ gf_label_window_new (gint monitor,
const gchar *label)
{
GfLabelWindow *window;
- GdkScreen *screen;
+ GdkDisplay *display;
+ GdkMonitor *gdk_monitor;
gint width;
gint height;
gint size;
- screen = gdk_screen_get_default ();
+ display = gdk_display_get_default ();
window = g_object_new (GF_TYPE_LABEL_WINDOW,
"type", GTK_WINDOW_POPUP,
NULL);
- gdk_screen_get_monitor_workarea (screen, monitor, &window->monitor);
+ gdk_monitor = gdk_display_get_monitor (display, monitor);
+ gdk_monitor_get_workarea (gdk_monitor, &window->monitor);
width = window->monitor.width;
height = window->monitor.height;
diff --git a/gnome-flashback/libshell/gf-osd-window.c b/gnome-flashback/libshell/gf-osd-window.c
index c694401..842739d 100644
--- a/gnome-flashback/libshell/gf-osd-window.c
+++ b/gnome-flashback/libshell/gf-osd-window.c
@@ -151,17 +151,19 @@ GfOsdWindow *
gf_osd_window_new (gint monitor)
{
GfOsdWindow *window;
- GdkScreen *screen;
+ GdkDisplay *display;
+ GdkMonitor *gdk_monitor;
gint width;
gint height;
gint size;
- screen = gdk_screen_get_default ();
+ display = gdk_display_get_default ();
window = g_object_new (GF_TYPE_OSD_WINDOW,
"type", GTK_WINDOW_POPUP,
NULL);
- gdk_screen_get_monitor_workarea (screen, monitor, &window->monitor);
+ gdk_monitor = gdk_display_get_monitor (display, monitor);
+ gdk_monitor_get_workarea (gdk_monitor, &window->monitor);
width = window->monitor.width;
height = window->monitor.height;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]