Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x
Modified Files:
ecore_x_private.h ecore_x_window.c
Log Message:
Set the default WM_CLIENT_MACHINE based on the results from gethostname, this
is the "right way" to determine it according to NetWM's example.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_private.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ecore_x_private.h 12 Oct 2003 17:35:35 -0000 1.8
+++ ecore_x_private.h 12 Oct 2003 17:55:28 -0000 1.9
@@ -1,6 +1,11 @@
#ifndef _ECORE_X_PRIVATE_H
#define _ECORE_X_PRIVATE_H
+#include <sys/param.h>
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN 256
+#endif
+
#define XK_MISCELLANY 1
#include <X11/Xlib.h>
#include <X11/Xproto.h>
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_window.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ecore_x_window.c 9 Oct 2003 02:20:37 -0000 1.3
+++ ecore_x_window.c 12 Oct 2003 17:55:28 -0000 1.4
@@ -17,6 +17,7 @@
Ecore_X_Window
ecore_x_window_new(Ecore_X_Window parent, int x, int y, int w, int h)
{
+ char buf[MAXHOSTNAMELEN];
Window win;
XSetWindowAttributes attr;
@@ -55,6 +56,10 @@
CWDontPropagate |
CWEventMask,
&attr);
+
+ gethostname(buf, MAXHOSTNAMELEN);
+ buf[MAXHOSTNAMELEN - 1] = '\0';
+ ecore_x_window_prop_client_machine_set(win, buf);
return win;
}
@@ -73,6 +78,7 @@
Ecore_X_Window
ecore_x_window_override_new(Ecore_X_Window parent, int x, int y, int w, int h)
{
+ char buf[MAXHOSTNAMELEN];
Window win;
XSetWindowAttributes attr;
@@ -111,6 +117,10 @@
CWDontPropagate |
CWEventMask,
&attr);
+
+ gethostname(buf, MAXHOSTNAMELEN);
+ buf[MAXHOSTNAMELEN - 1] = '\0';
+ ecore_x_window_prop_client_machine_set(win, buf);
return win;
}
@@ -129,6 +139,7 @@
Ecore_X_Window
ecore_x_window_input_new(Ecore_X_Window parent, int x, int y, int w, int h)
{
+ char buf[MAXHOSTNAMELEN];
Window win;
XSetWindowAttributes attr;
@@ -157,6 +168,10 @@
CWDontPropagate |
CWEventMask,
&attr);
+
+ gethostname(buf, MAXHOSTNAMELEN);
+ buf[MAXHOSTNAMELEN - 1] = '\0';
+ ecore_x_window_prop_client_machine_set(win, buf);
return win;
}
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs