XUnmapWindow(m_dpy, m_mainWindow);
XSync(m_dpy,TRUE);
- XUngrabKeyboard(m_dpy, CurrentTime);
- XUngrabPointer(m_dpy, CurrentTime);
XDestroyWindow(m_dpy, m_glWindow);
XDestroyWindow(m_dpy, m_mainWindow);
m_glWindow = 0;
m_bIgnoreNextFocusMessage = false;
}
-void CWinSystemX11::NotifyMouseCoverage(bool covered)
-{
- if (!m_bFullScreen || !m_mainWindow)
- return;
-
- if (covered && !m_bIsGrabbed)
- {
- int result = -1;
- while (result != GrabSuccess && result != AlreadyGrabbed)
- {
- result = XGrabPointer(m_dpy, m_mainWindow, True, ButtonPressMask, GrabModeAsync, GrabModeAsync, None, None, CurrentTime);
- XbmcThreads::ThreadSleep(100);
- }
- XGrabKeyboard(m_dpy, m_mainWindow, True, GrabModeAsync, GrabModeAsync, CurrentTime);
- m_bIsGrabbed = true;
- }
- else if (!covered && m_bIsGrabbed)
- {
- XUngrabKeyboard(m_dpy, CurrentTime);
- XUngrabPointer(m_dpy, CurrentTime);
- m_bIsGrabbed = false;
- }
-}
-
bool CWinSystemX11::Minimize()
{
m_bWasFullScreenBeforeMinimize = m_bFullScreen;
XWarpPointer(m_dpy, None, m_mainWindow, 0, 0, 0, 0, mouseX*width, mouseY*height);
}
- if (fullscreen)
- {
- int result = -1;
- while (result != GrabSuccess && result != AlreadyGrabbed)
- {
- result = XGrabPointer(m_dpy, m_mainWindow, True, ButtonPressMask, GrabModeAsync, GrabModeAsync, None, None, CurrentTime);
- XbmcThreads::ThreadSleep(100);
- }
- XGrabKeyboard(m_dpy, m_mainWindow, True, GrabModeAsync, GrabModeAsync, CurrentTime);
- m_bIsGrabbed = true;
- }
- else
- m_bIsGrabbed = false;
-
CDirtyRegionList dr;
RefreshGlxContext(m_currentOutput.compare(output) != 0);
XSync(m_dpy, FALSE);
void NotifyXRREvent();
void GetConnectedOutputs(std::vector<CStdString> *outputs);
bool IsCurrentOutput(CStdString output);
- void NotifyMouseCoverage(bool covered);
protected:
bool RefreshGlxContext(bool force);
bool m_bWasFullScreenBeforeMinimize;
bool m_minimized;
bool m_bIgnoreNextFocusMessage;
- bool m_bIsGrabbed;
int m_RREventBase;
CCriticalSection m_resourceSection;
std::vector<IDispResource*> m_resources;