summaryrefslogtreecommitdiffstats
path: root/x11vnc/xrandr.c
diff options
context:
space:
mode:
authorrunge <runge@karlrunge.com>2009-12-02 22:09:51 -0500
committerrunge <runge@karlrunge.com>2009-12-02 22:09:51 -0500
commit00a9a0ea4d0f642b34b4423ea867099b52edf078 (patch)
treec9df2a624681358103c80e79847fd415cf3a8e2f /x11vnc/xrandr.c
parentf40b0111827677625d81b7b7fcd001ce285adf69 (diff)
downloadlibtdevnc-00a9a0ea4d0f642b34b4423ea867099b52edf078.tar.gz
libtdevnc-00a9a0ea4d0f642b34b4423ea867099b52edf078.zip
x11vnc: -appshare mode for sharing an application windows instead of the
entire desktop. map port + 5500 in reverse connect. Add id_cmd remote control functions for id (and other) windows. Allow zero port in SSL reverse connections. Adjust delays between multiple reverse connections; X11VNC_REVERSE_SLEEP_MAX env var. Add some missing mutex locks; add INPUT_LOCK and threads_drop_input. More safety in -threads mode for new framebuffer change. Fix some stderr leaking in -inetd mode.
Diffstat (limited to 'x11vnc/xrandr.c')
-rw-r--r--x11vnc/xrandr.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/x11vnc/xrandr.c b/x11vnc/xrandr.c
index 90b9ac4..1e4c3f5 100644
--- a/x11vnc/xrandr.c
+++ b/x11vnc/xrandr.c
@@ -143,6 +143,8 @@ static void handle_xrandr_change(int new_x, int new_y) {
RAWFB_RET_VOID
+ /* assumes no X_LOCK */
+
/* sanity check xrandr_mode */
if (! xrandr_mode) {
xrandr_mode = strdup("default");
@@ -184,6 +186,8 @@ int check_xrandr_event(char *msg) {
RAWFB_RET(0)
+ /* it is assumed that X_LOCK is on at this point. */
+
if (subwin) {
return handle_subwin_resize(msg);
}
@@ -235,8 +239,13 @@ int check_xrandr_event(char *msg) {
if (wdpy_x == rev->width && wdpy_y == rev->height &&
xrandr_rotation == (int) rev->rotation) {
- rfbLog("check_xrandr_event: no change detected.\n");
+ rfbLog("check_xrandr_event: no change detected.\n");
do_change = 0;
+ if (! xrandr) {
+ rfbLog("check_xrandr_event: "
+ "enabling full XRANDR trapping anyway.\n");
+ xrandr = 1;
+ }
} else {
do_change = 1;
if (! xrandr) {
@@ -256,6 +265,7 @@ int check_xrandr_event(char *msg) {
XRRUpdateConfiguration(&xev);
if (do_change) {
+ /* under do_change caller normally returns before its X_UNLOCK */
X_UNLOCK;
handle_xrandr_change(rev->width, rev->height);
}