CVS: rdesktop xwin.c,1.205.2.16,1.205.2.17
Pierre Ossman <[email protected]> Thu, 16 Mar 2006 00:11:34 -0800
| Newsgroups | gmane.network.rdesktop.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19415
Modified Files:
Tag: seamlessrdp-branch
xwin.c
Log Message:
Handle initially minimized windows through WM_HINTS.
Index: xwin.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/xwin.c,v
retrieving revision 1.205.2.16
retrieving revision 1.205.2.17
diff -C2 -d -r1.205.2.16 -r1.205.2.17
*** xwin.c 15 Mar 2006 15:27:24 -0000 1.205.2.16
--- xwin.c 16 Mar 2006 08:11:29 -0000 1.205.2.17
***************
*** 55,58 ****
--- 55,59 ----
Window wnd;
unsigned long id;
+ XWMHints *hints;
int xoffset, yoffset;
int width, height;
***************
*** 294,297 ****
--- 295,299 ----
{
*prevnext = sw->next;
+ XFree(sw->hints);
xfree(sw);
return;
***************
*** 3114,3117 ****
--- 3116,3121 ----
sw->wnd = wnd;
sw->id = id;
+ sw->hints = XAllocWMHints();
+ sw->hints->flags = 0;
sw->xoffset = 0;
sw->yoffset = 0;
***************
*** 3213,3223 ****
}
- if (sw->state == SEAMLESSRDP_NOTYETMAPPED)
- {
- XMapWindow(g_display, sw->wnd);
- }
-
- sw->state = state;
-
switch (state)
{
--- 3217,3220 ----
***************
*** 3225,3228 ****
--- 3222,3226 ----
case SEAMLESSRDP_MAXIMIZED:
ewmh_change_state(sw->wnd, state);
+ XMapWindow(g_display, sw->wnd);
break;
case SEAMLESSRDP_MINIMIZED:
***************
*** 3232,3236 ****
such as minimization, rather than an independent state." Besides,
XIconifyWindow is easier. */
! XIconifyWindow(g_display, sw->wnd, DefaultScreen(g_display));
break;
default:
--- 3230,3242 ----
such as minimization, rather than an independent state." Besides,
XIconifyWindow is easier. */
! if (sw->state == SEAMLESSRDP_NOTYETMAPPED)
! {
! sw->hints->flags |= StateHint;
! sw->hints->initial_state = IconicState;
! XSetWMHints(g_display, sw->wnd, sw->hints);
! XMapWindow(g_display, sw->wnd);
! }
! else
! XIconifyWindow(g_display, sw->wnd, DefaultScreen(g_display));
break;
default:
***************
*** 3238,3241 ****
--- 3244,3249 ----
break;
}
+
+ 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