Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x
Modified Files:
Makefile.am ecore_x.c ecore_x_private.h
Log Message:
xprint support to weed out xprint screens from the root list - they arent
real roots - they are special... :)
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Makefile.am,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- Makefile.am 14 Mar 2005 15:32:08 -0000 1.21
+++ Makefile.am 23 Mar 2005 11:49:47 -0000 1.22
@@ -2,6 +2,7 @@
INCLUDES = \
@Xcursor_cflags@ \
[EMAIL PROTECTED]@ \
@Xinerama_cflags@ \
@x_cflags@ \
-I$(top_srcdir)/src/lib/ecore \
@@ -44,6 +45,7 @@
libecore_x_la_LIBADD = \
@Xcursor_libs@ \
[EMAIL PROTECTED]@ \
@Xinerama_libs@ \
@x_ldflags@ \
@x_libs@ \
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -3 -r1.67 -r1.68
--- ecore_x.c 14 Mar 2005 15:32:08 -0000 1.67
+++ ecore_x.c 23 Mar 2005 11:49:48 -0000 1.68
@@ -788,11 +788,72 @@
if (!num_ret) return NULL;
*num_ret = 0;
+#ifdef ECORE_XPRINT
+ {
+ Screen **ps = NULL;
+ int psnum = 0;
+
+ num = ScreenCount(_ecore_x_disp);
+ ps = XpQueryScreens(_ecore_x_disp, &psnum);
+ if (ps)
+ {
+ int overlap, j;
+
+ overlap = 0;
+ for (i = 0; i < num; i++)
+ {
+ for (j = 0; j < psnum; j++)
+ {
+ if (ScreenOfDisplay(_ecore_x_disp, i) == ps[j])
+ overlap++;
+ }
+ }
+ roots = malloc((num - overlap) * sizeof(Window));
+ if (roots)
+ {
+ int k;
+
+ k = 0;
+ for (i = 0; i < num; i++)
+ {
+ int is_print;
+
+ is_print = 0;
+ for (j = 0; j < psnum; j++)
+ {
+ if (ScreenOfDisplay(_ecore_x_disp, i) == ps[j])
+ {
+ is_print = 1;
+ break;
+ }
+ }
+ if (!is_print)
+ {
+ roots[k] = RootWindow(_ecore_x_disp, i);
+ k++;
+ }
+ }
+ *num_ret = k;
+ }
+ XFree(ps);
+ }
+ else
+ {
+ roots = malloc(num * sizeof(Window));
+ if (!roots) return NULL;
+ *num_ret = num;
+ for (i = 0; i < num; i++)
+ roots[i] = RootWindow(_ecore_x_disp, i);
+ }
+ }
+#else
num = ScreenCount(_ecore_x_disp);
roots = malloc(num * sizeof(Window));
if (!roots) return NULL;
*num_ret = num;
- for (i = 0; i < num; i++) roots[i] = RootWindow(_ecore_x_disp, i);
+ for (i = 0; i < num; i++)
+ roots[i] = RootWindow(_ecore_x_disp, i);
+#endif
return roots;
}
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_private.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -3 -r1.38 -r1.39
--- ecore_x_private.h 23 Mar 2005 10:53:34 -0000 1.38
+++ ecore_x_private.h 23 Mar 2005 11:49:48 -0000 1.39
@@ -20,6 +20,9 @@
#ifdef ECORE_XCURSOR
#include <X11/Xcursor/Xcursor.h>
#endif
+#ifdef ECORE_XPRINT
+#include <X11/extensions/Print.h>
+#endif
#ifdef ECORE_XINERAMA
#include <X11/extensions/Xinerama.h>
#endif
-------------------------------------------------------
This SF.net email is sponsored by: 2005 Windows Mobile Application Contest
Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones
for the chance to win $25,000 and application distribution. Enter today at
http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs