aboutsummaryrefslogtreecommitdiffstats
path: root/src/xfns.c
diff options
context:
space:
mode:
authorPaul Eggert <[email protected]>2013-05-08 15:56:08 -0700
committerPaul Eggert <[email protected]>2013-05-08 15:56:08 -0700
commitad75d77ea30f940da9bcc3a96ee265896248e7ee (patch)
tree4a88d76b4d716ea9eed03224e555d00847f1c48b /src/xfns.c
parenta9e4425bc99733b6ecf3898801b6595f35c4ef30 (diff)
* xterm.h (GTK_PREREQ): New macro.
All simple uses of GTK_MAJOR_VERSION and GTK_MINOR_VERSION changed to use this macro instead, for consistency and clarity.
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 2164ff5cd7..6d1d68dcad 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -3804,7 +3804,7 @@ If omitted or nil, that stands for the selected frame's display. */)
Return false if and only if the workarea information cannot be
obtained via the _NET_WORKAREA root window property. */
-#if !defined USE_GTK || GTK_MAJOR_VERSION < 3 + (GTK_MINOR_VERSION < 4)
+#if ! (defined USE_GTK && GTK_PREREQ (3, 4))
static bool
x_get_net_workarea (struct x_display_info *dpyinfo, XRectangle *rect)
{
@@ -4265,7 +4265,7 @@ Internal use only, use `display-monitor-attributes-list' instead. */)
/ x_display_pixel_height (dpyinfo));
gdpy = gdk_x11_lookup_xdisplay (dpyinfo->display);
gscreen = gdk_display_get_default_screen (gdpy);
-#if GTK_MAJOR_VERSION > 2 || GTK_MINOR_VERSION >= 20
+#if GTK_PREREQ (2, 20)
primary_monitor = gdk_screen_get_primary_monitor (gscreen);
#endif
n_monitors = gdk_screen_get_n_monitors (gscreen);
@@ -4300,7 +4300,7 @@ Internal use only, use `display-monitor-attributes-list' instead. */)
gdk_screen_get_monitor_geometry (gscreen, i, &rec);
geometry = list4i (rec.x, rec.y, rec.width, rec.height);
-#if GTK_MAJOR_VERSION > 2 || GTK_MINOR_VERSION >= 14
+#if GTK_PREREQ (2, 14)
width_mm = gdk_screen_get_monitor_width_mm (gscreen, i);
height_mm = gdk_screen_get_monitor_height_mm (gscreen, i);
#endif
@@ -4312,7 +4312,7 @@ Internal use only, use `display-monitor-attributes-list' instead. */)
list2i (width_mm, height_mm)),
attributes);
-#if GTK_MAJOR_VERSION > 3 || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 4)
+#if GTK_PREREQ (3, 4)
gdk_screen_get_monitor_workarea (gscreen, i, &rec);
workarea = list4i (rec.x, rec.y, rec.width, rec.height);
#else
@@ -4339,7 +4339,7 @@ Internal use only, use `display-monitor-attributes-list' instead. */)
attributes = Fcons (Fcons (Qworkarea, workarea), attributes);
attributes = Fcons (Fcons (Qgeometry, geometry), attributes);
-#if GTK_MAJOR_VERSION > 2 || (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 14)
+#if GTK_PREREQ (2, 14)
{
char *name = gdk_screen_get_monitor_plug_name (gscreen, i);
if (name)