CVS: rdesktop constants.h,1.45.2.1,1.45.2.2 xwin.c,1.205.2.11,1.205.2.12
Peter Ã
strand <[email protected]> Wed, 15 Mar 2006 04:58:54 -0800
| Newsgroups | gmane.network.rdesktop.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29090
Modified Files:
Tag: seamlessrdp-branch
constants.h xwin.c
Log Message:
Do not map seamless window until STATE is recieved
Index: constants.h
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/constants.h,v
retrieving revision 1.45.2.1
retrieving revision 1.45.2.2
diff -C2 -d -r1.45.2.1 -r1.45.2.2
*** constants.h 10 Mar 2006 08:50:43 -0000 1.45.2.1
--- constants.h 15 Mar 2006 12:58:50 -0000 1.45.2.2
***************
*** 415,418 ****
--- 415,419 ----
/* SeamlessRDP constants */
+ #define SEAMLESSRDP_NOTYETMAPPED -1
#define SEAMLESSRDP_NORMAL 0
#define SEAMLESSRDP_MINIMIZED 1
Index: xwin.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/xwin.c,v
retrieving revision 1.205.2.11
retrieving revision 1.205.2.12
diff -C2 -d -r1.205.2.11 -r1.205.2.12
*** xwin.c 15 Mar 2006 08:41:48 -0000 1.205.2.11
--- xwin.c 15 Mar 2006 12:58:50 -0000 1.205.2.12
***************
*** 57,61 ****
int xoffset, yoffset;
int width, height;
! unsigned int state; /* normal/minimized/maximized */
unsigned int desktop;
struct _seamless_window *next;
--- 57,61 ----
int xoffset, yoffset;
int width, height;
! int state; /* normal/minimized/maximized. */
unsigned int desktop;
struct _seamless_window *next;
***************
*** 3045,3048 ****
--- 3045,3049 ----
XSetWindowAttributes attribs;
XClassHint *classhints;
+ XSizeHints *sizehints;
long input_mask;
seamless_window *sw, *sw_parent;
***************
*** 3056,3063 ****
attribs.override_redirect = False;
! /* FIXME: Do not assume that -1, -1 is outside screen Consider
! wait with showing the window until STATE and others have
! been recieved. */
! wnd = XCreateWindow(g_display, RootWindowOfScreen(g_screen), -1, -1, 1, 1, 0, 0,
InputOutput, g_visual,
CWBackPixel | CWBackingStore | CWOverrideRedirect | CWColormap |
--- 3057,3061 ----
attribs.override_redirect = False;
! wnd = XCreateWindow(g_display, RootWindowOfScreen(g_screen), -1, -1, 1, 1, 0, g_depth,
InputOutput, g_visual,
CWBackPixel | CWBackingStore | CWOverrideRedirect | CWColormap |
***************
*** 3076,3079 ****
--- 3074,3086 ----
}
+ /* WM_NORMAL_HINTS */
+ sizehints = XAllocSizeHints();
+ if (sizehints != NULL)
+ {
+ sizehints->flags = USPosition;
+ XSetWMNormalHints(g_display, wnd, sizehints);
+ XFree(sizehints);
+ }
+
/* Set WM_TRANSIENT_FOR, if necessary */
if (parent)
***************
*** 3093,3098 ****
XSelectInput(g_display, wnd, input_mask);
- XMapWindow(g_display, wnd);
-
/* handle the WM_DELETE_WINDOW protocol. FIXME: When killing a
seamless window, we could try to close the window on the
--- 3100,3103 ----
***************
*** 3107,3110 ****
--- 3112,3117 ----
sw->width = 0;
sw->height = 0;
+ sw->state = SEAMLESSRDP_NOTYETMAPPED;
+ sw->desktop = 0;
sw->next = g_seamless_windows;
g_seamless_windows = sw;
***************
*** 3158,3163 ****
/* If we move the window in a maximized state, then KDE won't
accept restoration */
! if (sw->state != SEAMLESSRDP_NORMAL)
! return;
/* FIXME: Perhaps use ewmh_net_moveresize_window instead */
--- 3165,3174 ----
/* If we move the window in a maximized state, then KDE won't
accept restoration */
! switch (sw->state)
! {
! case SEAMLESSRDP_MINIMIZED:
! case SEAMLESSRDP_MAXIMIZED:
! return;
! }
/* FIXME: Perhaps use ewmh_net_moveresize_window instead */
***************
*** 3194,3197 ****
--- 3205,3213 ----
}
+ if (sw->state == SEAMLESSRDP_NOTYETMAPPED)
+ {
+ XMapWindow(g_display, sw->wnd);
+ }
+
sw->state = state;
-------------------------------------------------------
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