summaryrefslogtreecommitdiffstats
path: root/x11vnc/userinput.c
diff options
context:
space:
mode:
authorrunge <runge>2007-04-07 21:39:20 +0000
committerrunge <runge>2007-04-07 21:39:20 +0000
commitb6498656ae9f7dee3ca2022fdcae5394008936c1 (patch)
tree0599779038a00f12ec019593da1e25373e4e0c7d /x11vnc/userinput.c
parent570b8e90900d4ca5a9136f0f835557553410df4a (diff)
downloadlibtdevnc-b6498656ae9f7dee3ca2022fdcae5394008936c1.tar.gz
libtdevnc-b6498656ae9f7dee3ca2022fdcae5394008936c1.zip
x11vnc: add gnome, kde, etc. FINDCREATEDISPLAY tags.
Diffstat (limited to 'x11vnc/userinput.c')
-rw-r--r--x11vnc/userinput.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/x11vnc/userinput.c b/x11vnc/userinput.c
index 4d86667..5fd37ae 100644
--- a/x11vnc/userinput.c
+++ b/x11vnc/userinput.c
@@ -8062,6 +8062,9 @@ void set_ncache_xrootpmap(void) {
if (use_solid_bg) {
image = solid_image(NULL);
+ if (!quiet) {
+ rfbLog("set_ncache_xrootpmap: solid_image\n");
+ }
} else if (pmap != None) {
Pixmap pixmap = None;
unsigned char *d_pmap;
@@ -8079,8 +8082,9 @@ void set_ncache_xrootpmap(void) {
rfbLog("set_ncache_xrootpmap: loading background pixmap: 0x%lx\n", pixmap);
}
} else {
- rfbLog("set_ncache_xrootpmap: trying root background\n");
-
+ if (!quiet) {
+ rfbLog("set_ncache_xrootpmap: trying root background\n");
+ }
}
if (image == NULL) {
image = solid_root((char *) 0x1);
@@ -8971,12 +8975,19 @@ if (hack_val == 2) {
n = 0;
ttot = 0;
- if (dt_guess == NULL || now > dt_last + 30) {
- if (dt_guess) {
- free(dt_guess);
- }
+ if (dt_guess == NULL || now > dt_last + 60) {
+ static char *dt_prev = NULL;
+ dt_prev = dt_guess;
dt_guess = strdup(guess_desktop());
+ if (ncache_xrootpmap && dt_prev && dt_guess) {
+ if (strcmp(dt_prev, dt_guess)) {
+ set_ncache_xrootpmap();
+ }
+ }
dt_last = now;
+ if (dt_prev) {
+ free(dt_prev);
+ }
}
if (dt_guess && !strcmp(dt_guess, "gnome")) {
dt_gnome = 1;