summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWeseung Hwang <weseung@gmail.com>2011-02-22 15:03:12 -0800
committerWeseung Hwang <weseung@gmail.com>2011-02-22 15:03:12 -0800
commit75b43decf75659b1354750795467ed734ebafb0b (patch)
treed23ca01c3bae2d8b96f59b909babafd3268c58f1
parent3d74a2c2e8e3f52b0127bbeadb9a57cbe06c7534 (diff)
Fixed a warning; added window title display of the DISPLAY env. variable that the nested server is running on (and the screen number). Unfortunately, at this point the behavior is incorrect, returning the DISPLAY of the host that invoked the nested instance. Not sure how to pass the info from within the nested server back out to the host client to get the correct information...
-rw-r--r--src/client.h1
-rw-r--r--src/input.c1
-rw-r--r--src/xlibclient.c14
3 files changed, 11 insertions, 5 deletions
diff --git a/src/client.h b/src/client.h
index a32c61a..a52bd35 100644
--- a/src/client.h
+++ b/src/client.h
@@ -59,4 +59,3 @@ void NestedClientTimerCallback(NestedClientPrivatePtr pPriv);
void NestedClientCloseScreen(NestedClientPrivatePtr pPriv);
void NestedClientSetDevicePtr(NestedClientPrivatePtr pPriv, void* dev);
-
diff --git a/src/input.c b/src/input.c
index e3d1b9e..46e6d63 100644
--- a/src/input.c
+++ b/src/input.c
@@ -12,6 +12,7 @@
#include <xorg/xf86.h>
#include <xorg/xf86Module.h>
#include <xorg/xf86str.h>
+#include <xorg/xf86_OSproc.h>
#include "config.h"
diff --git a/src/xlibclient.c b/src/xlibclient.c
index 51363d0..bdb5d22 100644
--- a/src/xlibclient.c
+++ b/src/xlibclient.c
@@ -90,6 +90,7 @@ NestedClientCreateScreen(int scrnIndex,
int shmMajor, shmMinor;
Bool hasSharedPixmaps;
+ char windowTitle[32];
pPriv = malloc(sizeof(struct NestedClientPrivate));
pPriv->scrnIndex = scrnIndex;
@@ -113,13 +114,17 @@ NestedClientCreateScreen(int scrnIndex,
sizeHints.max_height = height;
XSetWMNormalHints(pPriv->display, pPriv->window, &sizeHints);
- XStoreName(pPriv->display, pPriv->window, "Title");
+ sprintf(windowTitle, "Display #%s",
+ DisplayString(pPriv->display));
+
+ XStoreName(pPriv->display, pPriv->window, windowTitle);
XMapWindow(pPriv->display, pPriv->window);
XSelectInput(pPriv->display, pPriv->window, ExposureMask |
- PointerMotionMask | EnterWindowMask | LeaveWindowMask | ButtonPressMask |
- ButtonReleaseMask | KeyPressMask |KeyReleaseMask);
+ PointerMotionMask | EnterWindowMask | LeaveWindowMask |
+ ButtonPressMask | ButtonReleaseMask | KeyPressMask |
+ KeyReleaseMask);
if (XShmQueryExtension(pPriv->display)) {
if (XShmQueryVersion(pPriv->display, &shmMajor, &shmMinor,
@@ -313,6 +318,7 @@ NestedClientCloseScreen(NestedClientPrivatePtr pPriv) {
XCloseDisplay(pPriv->display);
}
-void NestedClientSetDevicePtr(NestedClientPrivatePtr pPriv, void *dev) {
+void
+NestedClientSetDevicePtr(NestedClientPrivatePtr pPriv, void *dev) {
pPriv->dev = dev;
}