aboutsummaryrefslogtreecommitdiffstats
path: root/matchbox2/mb-wm-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'matchbox2/mb-wm-util.c')
-rw-r--r--matchbox2/mb-wm-util.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/matchbox2/mb-wm-util.c b/matchbox2/mb-wm-util.c
index 792cb81..f99777c 100644
--- a/matchbox2/mb-wm-util.c
+++ b/matchbox2/mb-wm-util.c
@@ -1,4 +1,9 @@
-#include "mb-wm.h"
+#include "mb-wm-config.h"
+#include "mb-wm-util.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
#include <stdarg.h>
static int TrappedErrorCode = 0;
@@ -268,22 +273,3 @@ mb_wm_rgba_icon_free (MBWMRgbaIcon *icon)
free (icon);
}
-int
-mb_wm_util_pixels_to_points (MBWindowManager *wm, int pixels)
-{
- static double scale = 0.0; /* Points per pixel */
- int points;
-
- if (scale == 0.0)
- {
- scale =
- ((double)DisplayHeightMM (wm->xdpy, wm->xscreen) * 2.8346456693)
- / (double) DisplayHeight(wm->xdpy, wm->xscreen);
- }
-
- /* Scale and round */
- points = (((int)((double)(pixels << 10) * scale) + 512) >> 10);
-
- return points;
-}
-