summaryrefslogtreecommitdiff
path: root/src/gpm-kbd-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-kbd-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-kbd-backlight.c')
-rw-r--r--src/gpm-kbd-backlight.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/gpm-kbd-backlight.c b/src/gpm-kbd-backlight.c
index cdfadbc..ae8e0fa 100644
--- a/src/gpm-kbd-backlight.c
+++ b/src/gpm-kbd-backlight.c
@@ -32,10 +32,6 @@
#include "gpm-kbd-backlight.h"
#include "gsd-media-keys-window.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_KBD_BACKLIGHT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPM_TYPE_KBD_BACKLIGHT, GpmKbdBacklightPrivate))
struct GpmKbdBacklightPrivate
@@ -190,11 +186,9 @@ gpm_kbd_backlight_dialog_show (GpmKbdBacklight *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
@@ -212,7 +206,6 @@ gpm_kbd_backlight_dialog_show (GpmKbdBacklight *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);
@@ -220,13 +213,7 @@ gpm_kbd_backlight_dialog_show (GpmKbdBacklight *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);