11 #include "settings/lib/ISettingCallback.h" 12 #include "threads/CriticalSection.h" 13 #include "threads/SystemClock.h" 14 #include "utils/Stopwatch.h" 15 #include "windowing/WinSystem.h" 21 #include <X11/Xutil.h> 40 const std::string GetName()
override {
return "x11"; }
43 bool InitWindowSystem()
override;
44 bool DestroyWindowSystem()
override;
45 bool CreateNewWindow(
const std::string& name,
bool fullScreen,
RESOLUTION_INFO& res)
override;
46 bool DestroyWindow()
override;
47 bool ResizeWindow(
int newWidth,
int newHeight,
int newLeft,
int newTop)
override;
48 void FinishWindowResize(
int newWidth,
int newHeight)
override;
49 bool SetFullScreen(
bool fullScreen,
RESOLUTION_INFO& res,
bool blankOtherDisplays)
override;
50 void UpdateResolutions()
override;
51 void ShowOSMouse(
bool show)
override;
53 void NotifyAppActiveChange(
bool bActivated)
override;
54 void NotifyAppFocusChange(
bool bGaining)
override;
56 bool Minimize()
override;
57 bool Restore()
override;
59 bool Show(
bool raise =
true)
override;
63 bool UseLimitedColor()
override;
65 std::vector<std::string> GetConnectedOutputs()
override;
68 Display* GetDisplay() {
return m_dpy; }
69 int GetScreen() {
return m_screen; }
70 void NotifyXRREvent();
71 bool IsCurrentOutput(
const std::string& output);
72 void RecreateWindow();
73 int GetCrtc() {
return m_crtc; }
76 bool MessagePump()
override;
79 std::unique_ptr<KODI::WINDOWING::IOSScreenSaver> GetOSScreenSaverImpl()
override;
81 virtual bool SetWindow(
int width,
int height,
bool fullscreen,
const std::string &output,
int *winstate = NULL) = 0;
82 virtual XVisualInfo* GetVisual() = 0;
86 Window m_glWindow = 0, m_mainWindow = 0;
89 Cursor m_invisibleCursor = 0;
92 bool m_bWasFullScreenBeforeMinimize;
94 bool m_bIgnoreNextFocusMessage;
95 CCriticalSection m_resourceSection;
96 std::vector<IDispResource*> m_resources;
97 bool m_delayDispReset;
99 std::string m_currentOutput;
100 std::string m_userOutput;
102 bool m_bIsInternalXrr;
103 int m_MouseX, m_MouseY;
108 bool IsSuitableVisual(XVisualInfo *vInfo);
109 static int XErrorHandler(Display* dpy, XErrorEvent* error);
110 bool CreateIconPixmap();
111 bool HasWindowManager();
Definition: WinSystem.h:49
Definition: SystemClock.h:31
Definition: WinEventsX11.h:27
Definition: DispResource.h:14
Provide info of a resolution.
Definition: Resolution.h:66
Definition: AudioDecoder.h:18
Definition: WinSystemX11.h:34