summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authormonsta <[email protected]>2018-01-27 23:29:02 +0300
committerraveit65 <[email protected]>2018-01-28 16:15:18 +0100
commit16de6ccd2906b93f79880612b31a12a1e53557c7 (patch)
treec1643f9e04908007ee58457f7532225a9f56d7bd /src/ui
parent4525d9b629ed76df0bc7d9b10b52c990fa112351 (diff)
downloadmarco-16de6ccd2906b93f79880612b31a12a1e53557c7.tar.bz2
marco-16de6ccd2906b93f79880612b31a12a1e53557c7.tar.xz
require GTK+ 3.22 and GLib 2.50
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/draw-workspace.c7
-rw-r--r--src/ui/fixedtip.c13
-rw-r--r--src/ui/metaaccellabel.c15
-rw-r--r--src/ui/ui.c9
4 files changed, 1 insertions, 43 deletions
diff --git a/src/ui/draw-workspace.c b/src/ui/draw-workspace.c
index bec502a5..e9838be1 100644
--- a/src/ui/draw-workspace.c
+++ b/src/ui/draw-workspace.c
@@ -65,7 +65,6 @@ get_window_rect (const WnckWindowDisplayInfo *win,
rect->height = height;
}
-#if GTK_CHECK_VERSION (3, 16, 0)
static void
get_background_color (GtkStyleContext *context,
GtkStateFlags state,
@@ -84,7 +83,6 @@ get_background_color (GtkStyleContext *context,
*color = *c;
gdk_rgba_free (c);
}
-#endif
static void
draw_window (GtkWidget *widget,
@@ -110,11 +108,8 @@ draw_window (GtkWidget *widget,
if (is_active)
meta_gtk_style_get_light_color (style, state, &color);
else
-#if GTK_CHECK_VERSION (3, 16, 0)
get_background_color (style, state, &color);
-#else
- gtk_style_context_get_background_color (style, state, &color);
-#endif
+
gdk_cairo_set_source_rgba (cr, &color);
cairo_rectangle (cr,
diff --git a/src/ui/fixedtip.c b/src/ui/fixedtip.c
index 346b6ffa..b5253cd6 100644
--- a/src/ui/fixedtip.c
+++ b/src/ui/fixedtip.c
@@ -67,11 +67,7 @@ meta_fixed_tip_show (int root_x, int root_y,
{
gint w;
gint h;
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkMonitor *mon_num;
-#else
- gint mon_num;
-#endif
GdkRectangle monitor;
gint screen_right_edge;
@@ -99,12 +95,8 @@ meta_fixed_tip_show (int root_x, int root_y,
label = gtk_label_new (NULL);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.5);
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
-#endif
gtk_widget_show (label);
gtk_container_set_border_width (GTK_CONTAINER (tip), 4);
@@ -114,13 +106,8 @@ meta_fixed_tip_show (int root_x, int root_y,
G_CALLBACK (gtk_widget_destroyed), &tip);
}
-#if GTK_CHECK_VERSION (3, 22, 0)
mon_num = gdk_display_get_monitor_at_point (gdk_screen_get_display (screen), root_x, root_y);
gdk_monitor_get_geometry (mon_num, &monitor);
-#else
- mon_num = gdk_screen_get_monitor_at_point (screen, root_x, root_y);
- gdk_screen_get_monitor_geometry (screen, mon_num, &monitor);
-#endif
screen_right_edge = monitor.x + monitor.width;
gtk_label_set_markup (GTK_LABEL (label), markup_text);
diff --git a/src/ui/metaaccellabel.c b/src/ui/metaaccellabel.c
index 319bceaa..93c16152 100644
--- a/src/ui/metaaccellabel.c
+++ b/src/ui/metaaccellabel.c
@@ -243,9 +243,6 @@ meta_accel_label_draw (GtkWidget *widget,
cairo_t *cr)
{
MetaAccelLabel *accel_label = META_ACCEL_LABEL (widget);
-#if !GTK_CHECK_VERSION (3, 16, 0)
- GtkMisc *misc = GTK_MISC (accel_label);
-#endif
GtkTextDirection direction;
int ac_width;
GtkAllocation allocation;
@@ -264,19 +261,11 @@ meta_accel_label_draw (GtkWidget *widget,
PangoLayout *accel_layout;
GtkLabel *label = GTK_LABEL (widget);
gint x, y, xpad, ypad;
-#if GTK_CHECK_VERSION (3, 16, 0)
gint margin_start, margin_end, margin_top, margin_bottom;
gfloat yalign;
-#else
- gfloat xalign, yalign;
-#endif
label_layout = gtk_label_get_layout (GTK_LABEL (accel_label));
-#if GTK_CHECK_VERSION (3, 16, 0)
yalign = gtk_label_get_yalign (GTK_LABEL (accel_label));
-#else
- gtk_misc_get_alignment (misc, &xalign, &yalign);
-#endif
cairo_save (cr);
@@ -303,7 +292,6 @@ meta_accel_label_draw (GtkWidget *widget,
cairo_restore (cr);
-#if GTK_CHECK_VERSION (3, 16, 0)
margin_start = gtk_widget_get_margin_start (widget);
margin_end = gtk_widget_get_margin_end (widget);
margin_top = gtk_widget_get_margin_top (widget);
@@ -311,9 +299,6 @@ meta_accel_label_draw (GtkWidget *widget,
xpad = margin_start + margin_end;
ypad = margin_top + margin_bottom;
-#else
- gtk_misc_get_padding (misc, &xpad, &ypad);
-#endif
if (direction == GTK_TEXT_DIR_RTL)
x = xpad;
diff --git a/src/ui/ui.c b/src/ui/ui.c
index 5af02ae6..c8b7e93e 100644
--- a/src/ui/ui.c
+++ b/src/ui/ui.c
@@ -94,11 +94,7 @@ maybe_redirect_mouse_event (XEvent *xevent)
{
GdkDisplay *gdisplay;
MetaUI *ui;
-#if GTK_CHECK_VERSION(3, 20, 0)
GdkSeat *seat;
-#else
- GdkDeviceManager *gmanager;
-#endif
GdkDevice *gdevice;
GdkEvent *gevent;
GdkWindow *gdk_window;
@@ -130,13 +126,8 @@ maybe_redirect_mouse_event (XEvent *xevent)
if (gdk_window == NULL)
return FALSE;
-#if GTK_CHECK_VERSION(3, 20, 0)
seat = gdk_display_get_default_seat (gdisplay);
gdevice = gdk_seat_get_pointer (seat);
-#else
- gmanager = gdk_display_get_device_manager (gdisplay);
- gdevice = gdk_device_manager_get_client_pointer (gmanager);
-#endif
/* If GDK already thinks it has a grab, we better let it see events; this
* is the menu-navigation case and events need to get sent to the appropriate