fixes to ShowFullScreen (KDE 3.1)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2003-02-03 23:23:05 +00:00
parent a2f26963ba
commit 1cff04deb5
3 changed files with 17 additions and 4 deletions

View File

@@ -524,7 +524,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style )
gint client_x, client_y, root_x, root_y;
gint width, height;
if (method == wxX11_FS_GENERIC)
if (method != wxX11_FS_WMSPEC)
{
// don't do it always, Metacity hates it
m_fsSaveGdkFunc = m_gdkFunc;
@@ -548,7 +548,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style )
}
else
{
if (method == wxX11_FS_GENERIC)
if (method != wxX11_FS_WMSPEC)
{
// don't do it always, Metacity hates it
m_gdkFunc = m_fsSaveGdkFunc;

View File

@@ -524,7 +524,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style )
gint client_x, client_y, root_x, root_y;
gint width, height;
if (method == wxX11_FS_GENERIC)
if (method != wxX11_FS_WMSPEC)
{
// don't do it always, Metacity hates it
m_fsSaveGdkFunc = m_gdkFunc;
@@ -548,7 +548,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style )
}
else
{
if (method == wxX11_FS_GENERIC)
if (method != wxX11_FS_WMSPEC)
{
// don't do it always, Metacity hates it
m_gdkFunc = m_fsSaveGdkFunc;

View File

@@ -400,17 +400,29 @@ static void wxSetKDEFullscreen(Display *display, Window rootWnd,
}
// it is neccessary to unmap the window, otherwise kwin will ignore us:
XSync(display, False);
bool wasMapped = IsMapped(display, w);
if (wasMapped)
{
XUnmapWindow(display, w);
XSync(display, False);
}
XChangeProperty(display, w, _NET_WM_WINDOW_TYPE, XA_ATOM, 32,
PropModeReplace, (unsigned char *) &data, lng);
XSync(display, False);
if (wasMapped)
{
XMapRaised(display, w);
XSync(display, False);
}
wxWMspecSetState(display, rootWnd, w,
fullscreen ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE,
_NET_WM_STATE_STAYS_ON_TOP);
XSync(display, False);
if (!fullscreen)
{
@@ -423,6 +435,7 @@ static void wxSetKDEFullscreen(Display *display, Window rootWnd,
XMoveResizeWindow(display, w,
origRect->x, origRect->y,
origRect->width, origRect->height);
XSync(display, False);
}
}