summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2015-10-06 13:13:01 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-10-06 13:40:52 -0400
commit434572355c7e929b84210b2f795634d38f13c913 (patch)
tree1801e4b687da5b88de5b232deb8b8221646ba557
parenta969cbaa3421dd7ca1e4dc668fd18379e1c69147 (diff)
ecore_x: Remove XPrint usage
Summary: Xprint has been deprecated since 2008. It's recently (August 2015) been removed from debian. Reviewers: zmike, devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3150
-rw-r--r--configure.ac1
-rw-r--r--src/lib/ecore_x/xlib/ecore_x.c78
-rw-r--r--src/lib/ecore_x/xlib/ecore_x_private.h3
3 files changed, 0 insertions, 82 deletions
diff --git a/configure.ac b/configure.ac
index 9c1794652f..c34191cf87 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3624,7 +3624,6 @@ if test "x${want_x11_xlib}" = "xyes" ; then
3624 ECORE_CHECK_X_EXTENSION([Xdpms], [dpms.h], [Xext], [DPMSQueryExtension]) 3624 ECORE_CHECK_X_EXTENSION([Xdpms], [dpms.h], [Xext], [DPMSQueryExtension])
3625 ECORE_CHECK_X_EXTENSION([Xfixes], [Xfixes.h], [Xfixes], [XFixesExpandRegion]) 3625 ECORE_CHECK_X_EXTENSION([Xfixes], [Xfixes.h], [Xfixes], [XFixesExpandRegion])
3626 ECORE_CHECK_X_EXTENSION([Xinerama], [Xinerama.h], [Xinerama], [XineramaQueryScreens]) 3626 ECORE_CHECK_X_EXTENSION([Xinerama], [Xinerama.h], [Xinerama], [XineramaQueryScreens])
3627 ECORE_CHECK_X_EXTENSION([Xprint], [Print.h], [Xp], [XpQueryScreens])
3628 ECORE_CHECK_X_EXTENSION([Xrandr], [Xrandr.h], [Xrandr], [XRRGetScreenResourcesCurrent]) 3627 ECORE_CHECK_X_EXTENSION([Xrandr], [Xrandr.h], [Xrandr], [XRRGetScreenResourcesCurrent])
3629 ECORE_CHECK_X_EXTENSION([Xrender], [Xrender.h], [Xrender], [XRenderFindVisualFormat]) 3628 ECORE_CHECK_X_EXTENSION([Xrender], [Xrender.h], [Xrender], [XRenderFindVisualFormat])
3630 ECORE_CHECK_X_EXTENSION([Xtest], [XTest.h], [Xtst], [XTestFakeKeyEvent]) 3629 ECORE_CHECK_X_EXTENSION([Xtest], [XTest.h], [Xtst], [XTestFakeKeyEvent])
diff --git a/src/lib/ecore_x/xlib/ecore_x.c b/src/lib/ecore_x/xlib/ecore_x.c
index 096f64d2e7..8e2057e24a 100644
--- a/src/lib/ecore_x/xlib/ecore_x.c
+++ b/src/lib/ecore_x/xlib/ecore_x.c
@@ -1219,9 +1219,6 @@ ecore_x_window_root_list(int *num_ret)
1219{ 1219{
1220 int num, i; 1220 int num, i;
1221 Ecore_X_Window *roots; 1221 Ecore_X_Window *roots;
1222#ifdef ECORE_XPRINT
1223 int xp_base, xp_err_base;
1224#endif /* ifdef ECORE_XPRINT */
1225 1222
1226 if (!num_ret) 1223 if (!num_ret)
1227 return NULL; 1224 return NULL;
@@ -1229,80 +1226,6 @@ ecore_x_window_root_list(int *num_ret)
1229 *num_ret = 0; 1226 *num_ret = 0;
1230 1227
1231 LOGFN(__FILE__, __LINE__, __FUNCTION__); 1228 LOGFN(__FILE__, __LINE__, __FUNCTION__);
1232#ifdef ECORE_XPRINT
1233 num = ScreenCount(_ecore_x_disp);
1234 if (XpQueryExtension(_ecore_x_disp, &xp_base, &xp_err_base))
1235 {
1236 Screen **ps = NULL;
1237 int psnum = 0;
1238
1239 ps = XpQueryScreens(_ecore_x_disp, &psnum);
1240 if (ps)
1241 {
1242 int overlap, j;
1243
1244 overlap = 0;
1245 for (i = 0; i < num; i++)
1246 {
1247 for (j = 0; j < psnum; j++)
1248 {
1249 if (ScreenOfDisplay(_ecore_x_disp, i) == ps[j])
1250 overlap++;
1251 }
1252 }
1253 roots = malloc(MAX((num - overlap) * sizeof(Ecore_X_Window), 1));
1254 if (roots)
1255 {
1256 int k;
1257
1258 k = 0;
1259 for (i = 0; i < num; i++)
1260 {
1261 int is_print;
1262
1263 is_print = 0;
1264 for (j = 0; j < psnum; j++)
1265 {
1266 if (ScreenOfDisplay(_ecore_x_disp, i) == ps[j])
1267 {
1268 is_print = 1;
1269 break;
1270 }
1271 }
1272 if (!is_print)
1273 {
1274 roots[k] = RootWindow(_ecore_x_disp, i);
1275 k++;
1276 }
1277 }
1278 *num_ret = k;
1279 }
1280
1281 XFree(ps);
1282 }
1283 else
1284 {
1285 roots = malloc(num * sizeof(Ecore_X_Window));
1286 if (!roots)
1287 return NULL;
1288
1289 *num_ret = num;
1290 for (i = 0; i < num; i++)
1291 roots[i] = RootWindow(_ecore_x_disp, i);
1292 }
1293 }
1294 else
1295 {
1296 roots = malloc(num * sizeof(Ecore_X_Window));
1297 if (!roots)
1298 return NULL;
1299
1300 *num_ret = num;
1301 for (i = 0; i < num; i++)
1302 roots[i] = RootWindow(_ecore_x_disp, i);
1303 }
1304
1305#else /* ifdef ECORE_XPRINT */
1306 num = ScreenCount(_ecore_x_disp); 1229 num = ScreenCount(_ecore_x_disp);
1307 roots = malloc(num * sizeof(Ecore_X_Window)); 1230 roots = malloc(num * sizeof(Ecore_X_Window));
1308 if (!roots) 1231 if (!roots)
@@ -1311,7 +1234,6 @@ ecore_x_window_root_list(int *num_ret)
1311 *num_ret = num; 1234 *num_ret = num;
1312 for (i = 0; i < num; i++) 1235 for (i = 0; i < num; i++)
1313 roots[i] = RootWindow(_ecore_x_disp, i); 1236 roots[i] = RootWindow(_ecore_x_disp, i);
1314#endif /* ifdef ECORE_XPRINT */
1315 return roots; 1237 return roots;
1316} 1238}
1317 1239
diff --git a/src/lib/ecore_x/xlib/ecore_x_private.h b/src/lib/ecore_x/xlib/ecore_x_private.h
index 97b3858f30..07c09fb16f 100644
--- a/src/lib/ecore_x/xlib/ecore_x_private.h
+++ b/src/lib/ecore_x/xlib/ecore_x_private.h
@@ -19,9 +19,6 @@
19#ifdef ECORE_XCURSOR 19#ifdef ECORE_XCURSOR
20#include <X11/Xcursor/Xcursor.h> 20#include <X11/Xcursor/Xcursor.h>
21#endif /* ifdef ECORE_XCURSOR */ 21#endif /* ifdef ECORE_XCURSOR */
22#ifdef ECORE_XPRINT
23#include <X11/extensions/Print.h>
24#endif /* ifdef ECORE_XPRINT */
25#ifdef ECORE_XINERAMA 22#ifdef ECORE_XINERAMA
26#include <X11/extensions/Xinerama.h> 23#include <X11/extensions/Xinerama.h>
27#endif /* ifdef ECORE_XINERAMA */ 24#endif /* ifdef ECORE_XINERAMA */