summaryrefslogtreecommitdiff
path: root/src/gpm-backlight.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-11-22 00:00:24 +0300
committermonsta <[email protected]>2016-11-22 00:00:24 +0300
commitce1cbb1ec0c2ca72457fedb88aef870b9a5036fd (patch)
treea149506e95dcde4970f0281867668294d7909091 /src/gpm-backlight.c
parentc1c672e45ffa331677a582289691e079cdde5138 (diff)
downloadmate-power-manager-ce1cbb1ec0c2ca72457fedb88aef870b9a5036fd.tar.bz2
mate-power-manager-ce1cbb1ec0c2ca72457fedb88aef870b9a5036fd.tar.xz
move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option
and require mate-panel >= 1.17
Diffstat (limited to 'src/gpm-backlight.c')
-rw-r--r--src/gpm-backlight.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/gpm-backlight.c b/src/gpm-backlight.c
index 82841b3..0989640 100644
--- a/src/gpm-backlight.c
+++ b/src/gpm-backlight.c
@@ -55,10 +55,6 @@
#include "gpm-icon-names.h"
#include "egg-console-kit.h"
-#if !GTK_CHECK_VERSION(3,0,0)
-#define gtk_widget_get_preferred_size(x,y,z) gtk_widget_size_request(x,y)
-#endif
-
#define GPM_BACKLIGHT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPM_TYPE_BACKLIGHT, GpmBacklightPrivate))
struct GpmBacklightPrivate
@@ -214,11 +210,9 @@ gpm_backlight_dialog_show (GpmBacklight *backlight)
GdkScreen *pointer_screen;
GdkRectangle geometry;
int monitor;
-#if GTK_CHECK_VERSION(3,0,0)
GdkDisplay *display;
GdkDeviceManager *device_manager;
GdkDevice *device;
-#endif
/*
* get the window size
@@ -236,7 +230,6 @@ gpm_backlight_dialog_show (GpmBacklight *backlight)
}
pointer_screen = NULL;
-#if GTK_CHECK_VERSION(3,0,0)
display = gtk_widget_get_display (backlight->priv->popup);
device_manager = gdk_display_get_device_manager (display);
device = gdk_device_manager_get_client_pointer (device_manager);
@@ -244,13 +237,7 @@ gpm_backlight_dialog_show (GpmBacklight *backlight)
&pointer_screen,
&pointer_x,
&pointer_y);
-#else
- gdk_display_get_pointer (gtk_widget_get_display (backlight->priv->popup),
- &pointer_screen,
- &pointer_x,
- &pointer_y,
- NULL);
-#endif
+
monitor = gdk_screen_get_monitor_at_point (pointer_screen,
pointer_x,
pointer_y);