CVS: rdesktop xwin.c,1.205.2.22,1.205.2.23
Pierre Ossman <[email protected]> Fri, 17 Mar 2006 02:48:14 -0800
| Newsgroups | gmane.network.rdesktop.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5115
Modified Files:
Tag: seamlessrdp-branch
xwin.c
Log Message:
Add some client side book keeping of window ordering and focus in order to
not send unnecessary updates. This is done to avoid side effects for commands
that would seem to be no-ops.
Index: xwin.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/xwin.c,v
retrieving revision 1.205.2.22
retrieving revision 1.205.2.23
diff -C2 -d -r1.205.2.22 -r1.205.2.23
*** xwin.c 17 Mar 2006 09:56:20 -0000 1.205.2.22
--- xwin.c 17 Mar 2006 10:48:11 -0000 1.205.2.23
***************
*** 56,59 ****
--- 56,60 ----
unsigned long id;
unsigned long parent;
+ unsigned long behind;
int xoffset, yoffset;
int width, height;
***************
*** 63,66 ****
--- 64,68 ----
} seamless_window;
static seamless_window *g_seamless_windows = NULL;
+ static unsigned long g_seamless_focused = 0;
static BOOL g_seamless_started = False; /* Server end is up and running */
static BOOL g_seamless_active = False; /* We are currently in seamless mode */
***************
*** 325,328 ****
--- 327,360 ----
static void
+ seamless_restack_window(seamless_window * sw, unsigned long behind)
+ {
+ seamless_window *sw_above;
+
+ /* Remove window from stack */
+ for (sw_above = g_seamless_windows; sw_above; sw_above = sw_above->next)
+ {
+ if (sw_above->behind == sw->id)
+ break;
+ }
+
+ if (sw_above)
+ sw_above->behind = sw->behind;
+
+ /* And then add it at the new position */
+
+ for (sw_above = g_seamless_windows; sw_above; sw_above = sw_above->next)
+ {
+ if (sw_above->behind == behind)
+ break;
+ }
+
+ if (sw_above)
+ sw_above->behind = sw->id;
+
+ sw->behind = behind;
+ }
+
+
+ static void
mwm_hide_decorations(Window wnd)
{
***************
*** 1775,1782 ****
--- 1807,1825 ----
}
+ if (!sw_below && !sw->behind)
+ return;
+ if (sw_below && (sw_below->id == sw->behind))
+ return;
+
if (sw_below)
+ {
seamless_send_zchange(sw->id, sw_below->id, 0);
+ seamless_restack_window(sw, sw_below->id);
+ }
else
+ {
seamless_send_zchange(sw->id, 0, 0);
+ seamless_restack_window(sw, 0);
+ }
}
***************
*** 1918,1922 ****
break;
! seamless_send_focus(sw->id, 0);
break;
--- 1961,1969 ----
break;
! if (sw->id != g_seamless_focused)
! {
! seamless_send_focus(sw->id, 0);
! g_seamless_focused = sw->id;
! }
break;
***************
*** 3174,3177 ****
--- 3221,3225 ----
sw->id = id;
sw->parent = parent;
+ sw->behind = 0;
sw->xoffset = 0;
sw->yoffset = 0;
***************
*** 3285,3288 ****
--- 3333,3338 ----
XRaiseWindow(g_display, sw->wnd);
}
+
+ seamless_restack_window(sw, behind);
}
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642