icccm respect - yo!

SVN revision: 24032
This commit is contained in:
Carsten Haitzler 2006-07-18 18:32:10 +00:00
parent 5cc651419e
commit 904e55e799
1 changed files with 20 additions and 0 deletions

View File

@ -393,6 +393,26 @@ ecore_x_window_show(Ecore_X_Window win)
EAPI void
ecore_x_window_hide(Ecore_X_Window win)
{
XEvent xev;
Window root;
int idum;
unsigned int uidum;
/* ICCCM: SEND unmap event... */
root = win;
if (ScreenCount(_ecore_x_disp) == 1)
root = DefaultRootWindow(_ecore_x_disp);
else
XGetGeometry(_ecore_x_disp, win, &root, &idum, &idum, &uidum, &uidum, &uidum, &uidum);
xev.xunmap.type = UnmapNotify;
xev.xunmap.serial = 0;
xev.xunmap.send_event = True;
xev.xunmap.display = _ecore_x_disp;
xev.xunmap.event = root;
xev.xunmap.window = win;
xev.xunmap.from_configure = False;
XSendEvent(_ecore_x_disp, xev.xunmap.event, False,
SubstructureRedirectMask | SubstructureNotifyMask, &xev);
XUnmapWindow(_ecore_x_disp, win);
}