13#include <X11/cursorfont.h>
26#ifdef WITH_OPENGL_BACKEND
30#ifdef WITH_VULKAN_BACKEND
36# include <X11/extensions/XInput2.h>
40#include <X11/Xresource.h>
77# define HOST_NAME_MAX 64
88#define _NET_WM_STATE_REMOVE 0
89#define _NET_WM_STATE_ADD 1
92#ifdef WITH_OPENGL_BACKEND
93static XVisualInfo *get_x11_visualinfo(Display *display)
96 XVisualInfo vinfo_template;
97 vinfo_template.screen = DefaultScreen(display);
98 return XGetVisualInfo(display, VisualScreenMask, &vinfo_template, &num_visuals);
112 const bool is_dialog,
113 const bool stereoVisual,
114 const bool exclusive,
119 m_visualInfo(nullptr),
123 m_invalid_window(
false),
124 m_empty_cursor(
None),
125 m_custom_cursor(
None),
126 m_visible_cursor(
None),
127 m_taskbar(
"blender.desktop"),
129 m_dropTarget(nullptr),
132#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
135 m_valid_setup(
false),
136 m_is_debug_context(is_debug),
137 m_preferred_device(preferred_device)
139#ifdef WITH_OPENGL_BACKEND
140 if (type == GHOST_kDrawingContextTypeOpenGL) {
141 m_visualInfo = get_x11_visualinfo(m_display);
146 XVisualInfo tmp = {
nullptr};
148 m_visualInfo = XGetVisualInfo(m_display, 0, &tmp, &n);
152 if (m_visualInfo ==
nullptr) {
153 fprintf(stderr,
"initial window could not find the GLX extension\n");
157 uint xattributes_valuemask = 0;
159 XSetWindowAttributes xattributes;
160 memset(&xattributes, 0,
sizeof(xattributes));
162 xattributes_valuemask |= CWBorderPixel;
163 xattributes.border_pixel = 0;
167 xattributes_valuemask |= CWEventMask;
168 xattributes.event_mask = ExposureMask | StructureNotifyMask | KeyPressMask | KeyReleaseMask |
169 EnterWindowMask | LeaveWindowMask | ButtonPressMask |
170 ButtonReleaseMask | PointerMotionMask | FocusChangeMask |
171 PropertyChangeMask | KeymapStateMask;
174 xattributes_valuemask |= CWOverrideRedirect;
175 xattributes.override_redirect = True;
178 xattributes_valuemask |= CWColormap;
179 xattributes.colormap = XCreateColormap(
180 m_display, RootWindow(m_display, m_visualInfo->screen), m_visualInfo->visual, AllocNone);
183 m_window = XCreateWindow(m_display,
184 RootWindow(m_display, m_visualInfo->screen),
192 m_visualInfo->visual,
193 xattributes_valuemask,
213 XChangeProperty(m_display,
243 if (is_dialog && parentWindow) {
250 XSizeHints *xsizehints = XAllocSizeHints();
251 xsizehints->flags = PPosition | PSize | PMinSize | PMaxSize;
252 xsizehints->x =
left;
254 xsizehints->width = width;
255 xsizehints->height = height;
256 xsizehints->min_width = 320;
257 xsizehints->min_height = 240;
258 xsizehints->max_width = 65535;
259 xsizehints->max_height = 65535;
260 XSetWMNormalHints(m_display, m_window, xsizehints);
266 XClassHint *xclasshint = XAllocClassHint();
267 const int len = strlen(title) + 1;
268 char *wmclass = (
char *)malloc(
sizeof(
char) *
len);
269 memcpy(wmclass, title,
len *
sizeof(
char));
270 xclasshint->res_name = wmclass;
271 xclasshint->res_class = wmclass;
272 XSetClassHint(m_display, m_window, xclasshint);
294 XSetWMProtocols(m_display, m_window, atoms, natom);
300 XWMHints *xwmhints = XAllocWMHints();
301 xwmhints->initial_state = NormalState;
303 xwmhints->flags = InputHint | StateHint;
304 XSetWMHints(display, m_window, xwmhints);
310 Atom _NET_WM_ICON = XInternAtom(m_display,
"_NET_WM_ICON", False);
311 XChangeProperty(m_display,
323 Atom _NET_WM_PID = XInternAtom(m_display,
"_NET_WM_PID", False);
324 pid_t pid = getpid();
326 m_display, m_window, _NET_WM_PID, XA_CARDINAL, 32, PropModeReplace, (
uchar *)&pid, 1);
333 XTextProperty text_prop;
335 gethostname(hostname,
sizeof(hostname));
336 hostname[
sizeof(hostname) - 1] =
'\0';
337 text_array[0] = hostname;
339 XStringListToTextProperty(text_array, 1, &text_prop);
340 XSetWMClientMachine(m_display, m_window, &text_prop);
341 XFree(text_prop.value);
344#ifdef WITH_X11_XINPUT
345 refreshXInputDevices();
350 m_valid_setup =
true;
355 "A graphics card and driver with support for OpenGL 4.3 or higher is "
356 "required.\n\nInstalling the latest driver for your graphics card might resolve the "
358 const char *help =
"https://www.blender.org/download/requirements/";
367 XMapRaised(m_display, m_window);
370 XMapWindow(m_display, m_window);
373 XLowerWindow(m_display, m_window);
381#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
382static Bool destroyICCallback(XIC , XPointer
ptr, XPointer )
387 *(XIC *)
ptr =
nullptr;
393bool GHOST_WindowX11::createX11_XIC()
395 XIM xim = m_system->getX11_XIM();
401 destroy.callback = (XICProc)destroyICCallback;
402 destroy.client_data = (XPointer)&m_xic;
403 m_xic = XCreateIC(xim,
409 XIMPreeditNothing | XIMStatusNothing,
422 XGetICValues(m_xic, XNFilterEvents, &fevent,
nullptr);
423 XSelectInput(m_display,
425 ExposureMask | StructureNotifyMask | KeyPressMask | KeyReleaseMask |
426 EnterWindowMask | LeaveWindowMask | ButtonPressMask | ButtonReleaseMask |
427 PointerMotionMask | FocusChangeMask | PropertyChangeMask | KeymapStateMask |
433#ifdef WITH_X11_XINPUT
434void GHOST_WindowX11::refreshXInputDevices()
436 if (m_system->m_xinput_version.present) {
437 std::vector<XEventClass> xevents;
439 for (GHOST_SystemX11::GHOST_TabletX11 &xtablet : m_system->GetXTablets()) {
446 DeviceMotionNotify(xtablet.Device, xtablet.MotionEvent, ev);
448 xevents.push_back(ev);
450 DeviceButtonPress(xtablet.Device, xtablet.PressEvent, ev);
452 xevents.push_back(ev);
454 ProximityIn(xtablet.Device, xtablet.ProxInEvent, ev);
456 xevents.push_back(ev);
458 ProximityOut(xtablet.Device, xtablet.ProxOutEvent, ev);
460 xevents.push_back(ev);
464 XSelectExtensionEvent(m_display, m_window, xevents.data(),
int(xevents.size()));
482 Atom name = XInternAtom(m_display,
"_NET_WM_NAME", 0);
483 Atom utf8str = XInternAtom(m_display,
"UTF8_STRING", 0);
485 m_display, m_window, name, utf8str, 8, PropModeReplace, (
const uchar *)title, strlen(title));
489 XStoreName(m_display, m_window, title);
496 char *name =
nullptr;
498 XFetchName(m_display, m_window, &name);
499 std::string title = name ? name :
"untitled";
514 int x_return, y_return;
515 uint w_return, h_return, border_w_return, depth_return;
518 XGetGeometry(m_display,
538 XWindowChanges values;
539 uint value_mask = CWWidth;
540 values.width = width;
541 XConfigureWindow(m_display, m_window, value_mask, &values);
548 XWindowChanges values;
549 uint value_mask = CWHeight;
550 values.height = height;
551 XConfigureWindow(m_display, m_window, value_mask, &values);
557 XWindowChanges values;
558 uint value_mask = CWWidth | CWHeight;
559 values.width = width;
560 values.height = height;
561 XConfigureWindow(m_display, m_window, value_mask, &values);
572 XTranslateCoordinates(
573 m_display, RootWindow(m_display, m_visualInfo->screen), m_window, 0, 0, &ax, &ay, &temp);
583 XTranslateCoordinates(
584 m_display, m_window, RootWindow(m_display, m_visualInfo->screen), inX, inY, &ax, &ay, &temp);
592 Atom atom_window_type = XInternAtom(m_display,
"_NET_WM_WINDOW_TYPE", False);
593 Atom atom_dialog = XInternAtom(m_display,
"_NET_WM_WINDOW_TYPE_DIALOG", False);
596 XChangeProperty(m_display,
602 (
uchar *)&atom_dialog,
604 XSetTransientForHint(m_display, m_window, parentWindow->m_window);
613 XChangeProperty(m_display,
625void GHOST_WindowX11::icccmSetState(
int state)
629 if (
state != IconicState) {
633 xev.xclient.type = ClientMessage;
634 xev.xclient.serial = 0;
635 xev.xclient.send_event = True;
636 xev.xclient.display = m_display;
637 xev.xclient.window = m_window;
638 xev.xclient.format = 32;
640 xev.xclient.data.l[0] =
state;
641 XSendEvent(m_display,
642 RootWindow(m_display, m_visualInfo->screen),
644 SubstructureNotifyMask | SubstructureRedirectMask,
648int GHOST_WindowX11::icccmGetState()
const
654 ulong bytes_after, num_ret;
660 ret = XGetWindowProperty(m_display,
671 ((
uchar **)&prop_ret));
672 if ((
ret == Success) && (prop_ret !=
nullptr) && (num_ret == 2)) {
673 st = prop_ret->state;
686void GHOST_WindowX11::netwmMaximized(
bool set)
690 xev.xclient.type = ClientMessage;
691 xev.xclient.serial = 0;
692 xev.xclient.send_event = True;
693 xev.xclient.window = m_window;
695 xev.xclient.format = 32;
706 xev.xclient.data.l[3] = 0;
707 xev.xclient.data.l[4] = 0;
708 XSendEvent(m_display,
709 RootWindow(m_display, m_visualInfo->screen),
711 SubstructureRedirectMask | SubstructureNotifyMask,
715bool GHOST_WindowX11::netwmIsMaximized()
const
718 ulong bytes_after, num_ret, i;
725 ret = XGetWindowProperty(m_display,
736 (
uchar **)&prop_ret);
737 if ((
ret == Success) && (prop_ret) && (format_ret == 32)) {
739 for (i = 0; i < num_ret; i++) {
759void GHOST_WindowX11::netwmFullScreen(
bool set)
763 xev.xclient.type = ClientMessage;
764 xev.xclient.serial = 0;
765 xev.xclient.send_event = True;
766 xev.xclient.window = m_window;
768 xev.xclient.format = 32;
778 xev.xclient.data.l[2] = 0;
779 xev.xclient.data.l[3] = 0;
780 xev.xclient.data.l[4] = 0;
781 XSendEvent(m_display,
782 RootWindow(m_display, m_visualInfo->screen),
784 SubstructureRedirectMask | SubstructureNotifyMask,
788bool GHOST_WindowX11::netwmIsFullScreen()
const
791 ulong bytes_after, num_ret, i;
798 ret = XGetWindowProperty(m_display,
809 (
uchar **)&prop_ret);
810 if ((
ret == Success) && (prop_ret) && (format_ret == 32)) {
811 for (i = 0; i < num_ret; i++) {
825void GHOST_WindowX11::motifFullScreen(
bool set)
837 XChangeProperty(m_display,
847bool GHOST_WindowX11::motifIsFullScreen()
const
850 ulong bytes_after, num_ret;
857 st = XGetWindowProperty(m_display,
868 (
uchar **)&prop_ret);
869 if ((st == Success) && prop_ret) {
889 state = icccmGetState();
894 if (
ELEM(
state, IconicState, WithdrawnState)) {
897 else if (netwmIsFullScreen() == True) {
900 else if (motifIsFullScreen() == True) {
903 else if (netwmIsMaximized() == True) {
912 bool is_max, is_full, is_motif_full;
915 if (
state ==
int(cur_state)) {
924 is_max = netwmIsMaximized();
925 is_full = netwmIsFullScreen();
932 is_motif_full = motifIsFullScreen();
935 state = m_normal_state;
939 if (is_max == True) {
940 netwmMaximized(False);
942 if (is_full == True) {
943 netwmFullScreen(False);
945 if (is_motif_full == True) {
946 motifFullScreen(False);
948 icccmSetState(NormalState);
961 m_normal_state = cur_state;
963 if (is_max == True) {
964 netwmMaximized(False);
966 if (is_full == False) {
967 netwmFullScreen(True);
969 if (is_motif_full == False) {
970 motifFullScreen(True);
984 if (is_full == True) {
985 netwmFullScreen(False);
987 if (is_motif_full == True) {
988 motifFullScreen(False);
990 if (is_max == False) {
991 netwmMaximized(True);
1001 icccmSetState(IconicState);
1011 XWindowAttributes attr;
1018 XRaiseWindow(m_display, m_window);
1020 atom = XInternAtom(m_display,
"_NET_ACTIVE_WINDOW", True);
1027 xev.xclient.type = ClientMessage;
1028 xev.xclient.serial = 0;
1029 xev.xclient.send_event = True;
1030 xev.xclient.
window = m_window;
1031 xev.xclient.message_type = atom;
1033 xev.xclient.format = 32;
1034 xev.xclient.data.l[0] = 1;
1035 xev.xclient.data.l[1] = CurrentTime;
1036 xev.xclient.data.l[2] = m_window;
1037 xev.xclient.data.l[3] = 0;
1038 xev.xclient.data.l[4] = 0;
1040 root = RootWindow(m_display, m_visualInfo->screen);
1041 eventmask = SubstructureRedirectMask | SubstructureNotifyMask;
1043 XSendEvent(m_display, root, False, eventmask, &xev);
1046 XGetWindowAttributes(m_display, m_window, &attr);
1049 if (attr.map_state == IsViewable) {
1050 XSetInputFocus(m_display, m_window, RevertToPointerRoot, CurrentTime);
1055 XLowerWindow(m_display, m_window);
1067 Atom atom_window_type = XInternAtom(m_display,
"_NET_WM_WINDOW_TYPE", False);
1068 Atom atom_dialog = XInternAtom(m_display,
"_NET_WM_WINDOW_TYPE_DIALOG", False);
1071 ulong bytes_after, num_ret;
1074 int format_ret,
ret;
1078 ret = XGetWindowProperty(m_display,
1089 (
uchar **)&prop_ret);
1090 if ((
ret == Success) && (prop_ret) && (format_ret == 32)) {
1091 if (prop_ret[0] == atom_dialog) {
1118 if (m_invalid_window ==
false) {
1120 m_invalid_window =
true;
1133 m_invalid_window =
false;
1138 std::map<uint, Cursor>::iterator it = m_standard_cursors.begin();
1139 for (; it != m_standard_cursors.end(); ++it) {
1140 XFreeCursor(m_display, it->second);
1143 if (m_empty_cursor) {
1144 XFreeCursor(m_display, m_empty_cursor);
1146 if (m_custom_cursor) {
1147 XFreeCursor(m_display, m_custom_cursor);
1150 if (m_valid_setup) {
1151 static Atom Primary_atom, Clipboard_atom;
1154 Primary_atom = XInternAtom(m_display,
"PRIMARY", False);
1155 Clipboard_atom = XInternAtom(m_display,
"CLIPBOARD", False);
1157 p_owner = XGetSelectionOwner(m_display, Primary_atom);
1158 c_owner = XGetSelectionOwner(m_display, Clipboard_atom);
1160 if (p_owner == m_window) {
1161 XSetSelectionOwner(m_display, Primary_atom,
None, CurrentTime);
1163 if (c_owner == m_window) {
1164 XSetSelectionOwner(m_display, Clipboard_atom,
None, CurrentTime);
1169 XFree(m_visualInfo);
1172#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
1179 delete m_dropTarget;
1184 if (m_valid_setup) {
1185 XDestroyWindow(m_display, m_window);
1192#ifdef WITH_VULKAN_BACKEND
1193 case GHOST_kDrawingContextTypeVulkan: {
1195 GHOST_kVulkanPlatformX11,
1204 m_preferred_device);
1205 if (context->initializeDrawingContext()) {
1213#ifdef WITH_OPENGL_BACKEND
1214 case GHOST_kDrawingContextTypeOpenGL: {
1217 for (
int minor = 6; minor >= 3; --minor) {
1221 EGLNativeWindowType(m_window),
1222 EGLNativeDisplayType(m_display),
1223 EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT,
1227 (m_is_debug_context ? EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR : 0),
1230 if (context->initializeDrawingContext()) {
1238 for (
int minor = 6; minor >= 3; --minor) {
1243 (GLXFBConfig)m_fbconfig,
1244 GLX_CONTEXT_CORE_PROFILE_BIT_ARB,
1249 if (context->initializeDrawingContext()) {
1270 xcursor_id = XC_question_arrow;
1273 xcursor_id = XC_watch;
1276 xcursor_id = XC_xterm;
1279 xcursor_id = XC_crosshair;
1282 xcursor_id = XC_sb_v_double_arrow;
1285 xcursor_id = XC_sb_h_double_arrow;
1288 xcursor_id = XC_top_side;
1291 xcursor_id = XC_bottom_side;
1294 xcursor_id = XC_left_side;
1297 xcursor_id = XC_right_side;
1300 xcursor_id = XC_top_left_corner;
1303 xcursor_id = XC_top_right_corner;
1306 xcursor_id = XC_bottom_right_corner;
1309 xcursor_id = XC_bottom_left_corner;
1319 xcursor = m_standard_cursors[xcursor_id];
1322 xcursor = XCreateFontCursor(m_display, xcursor_id);
1324 m_standard_cursors[xcursor_id] = xcursor;
1330Cursor GHOST_WindowX11::getEmptyCursor()
1332 if (!m_empty_cursor) {
1338 blank = XCreateBitmapFromData(
1339 m_display, RootWindow(m_display, m_visualInfo->screen), data, 1, 1);
1341 m_empty_cursor = XCreatePixmapCursor(m_display, blank, blank, &dummy, &dummy, 0, 0);
1342 XFreePixmap(m_display, blank);
1345 return m_empty_cursor;
1353 if (m_visible_cursor) {
1354 xcursor = m_visible_cursor;
1361 xcursor = getEmptyCursor();
1364 XDefineCursor(m_display, m_window, xcursor);
1381#ifdef GHOST_X11_GRAB
1382 XGrabPointer(m_display,
1385 ButtonPressMask | ButtonReleaseMask | PointerMotionMask,
1403#if defined(WITH_X11_XINPUT) && defined(USE_X11_XINPUT_WARP)
1404 if ((m_system->m_xinput_version.present) && (m_system->m_xinput_version.major_version >= 2))
1407 if (XIGetClientPointer(m_display,
None, &device_id) != False) {
1408 XIWarpPointer(m_display, device_id,
None,
None, 0, 0, 0, 0, 0, 0);
1414 XWarpPointer(m_display,
None,
None, 0, 0, 0, 0, 0, 0);
1427#ifdef GHOST_X11_GRAB
1428 XUngrabPointer(m_display, CurrentTime);
1444 m_visible_cursor = xcursor;
1446 XDefineCursor(m_display, m_window, xcursor);
1455 return getStandardCursor(shape, xcursor);
1466 Colormap colormap = DefaultColormap(m_display, m_visualInfo->screen);
1467 Pixmap bitmap_pix, mask_pix;
1470 if (XAllocNamedColor(m_display, colormap,
"White", &fg, &fg) == 0) {
1473 if (XAllocNamedColor(m_display, colormap,
"Black", &bg, &bg) == 0) {
1477 if (m_custom_cursor) {
1478 XFreeCursor(m_display, m_custom_cursor);
1481 bitmap_pix = XCreateBitmapFromData(m_display, m_window, (
char *)bitmap, sizex, sizey);
1482 mask_pix = XCreateBitmapFromData(m_display, m_window, (
char *)mask, sizex, sizey);
1484 m_custom_cursor = XCreatePixmapCursor(m_display, bitmap_pix, mask_pix, &fg, &bg, hotX, hotY);
1485 XDefineCursor(m_display, m_window, m_custom_cursor);
1488 m_visible_cursor = m_custom_cursor;
1490 XFreePixmap(m_display, bitmap_pix);
1491 XFreePixmap(m_display, mask_pix);
1493 XFreeColors(m_display, colormap, &fg.pixel, 1, 0
L);
1494 XFreeColors(m_display, colormap, &bg.pixel, 1, 0
L);
1503 int x_return, y_return;
1504 uint w_return, h_return, border_w_return, depth_return;
1506 XGetGeometry(m_display,
1522 err = XGrabKeyboard(m_display, m_window, False, GrabModeAsync, GrabModeAsync, CurrentTime);
1523 if (err != GrabSuccess) {
1524 printf(
"XGrabKeyboard failed %d\n", err);
1527 err = XGrabPointer(m_display,
1530 PointerMotionMask | ButtonPressMask | ButtonReleaseMask,
1536 if (err != GrabSuccess) {
1537 printf(
"XGrabPointer failed %d\n", err);
1545 XUngrabKeyboard(m_display, CurrentTime);
1546 XUngrabPointer(m_display, CurrentTime);
1554 char *resMan = XResourceManagerString(m_display);
1556 XrmDatabase xrdb = XrmGetStringDatabase(resMan);
1559 char *type =
nullptr;
1562 int success = XrmGetResource(xrdb,
"Xft.dpi",
"Xft.Dpi", &type, &val);
1563 if (success && type) {
1564 if (
STREQ(type,
"String")) {
1565 dpi = atoi((
const char *)val.addr);
1568 XrmDestroyDatabase(xrdb);
1577 XWindowAttributes attr;
1578 if (!XGetWindowAttributes(m_display, m_window, &attr)) {
1583 Screen *screen = attr.screen;
1584 int pixelWidth = WidthOfScreen(screen);
1585 int pixelHeight = HeightOfScreen(screen);
1586 int mmWidth = WidthMMOfScreen(screen);
1587 int mmHeight = HeightMMOfScreen(screen);
1589 double pixelDiagonal =
sqrt((pixelWidth * pixelWidth) + (pixelHeight * pixelHeight));
1590 double mmDiagonal =
sqrt((mmWidth * mmWidth) + (mmHeight * mmHeight));
1591 float inchDiagonal = mmDiagonal * 0.039f;
1592 int dpi = pixelDiagonal / inchDiagonal;
void BLI_kdtree_nd_ free(KDTree *tree)
#define GHOST_OPENGL_EGL_CONTEXT_FLAGS
#define GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY
#define GHOST_OPENGL_GLX_RESET_NOTIFICATION_STRATEGY
#define GHOST_OPENGL_GLX_CONTEXT_FLAGS
static const unsigned long BLENDER_ICONS_WM_X11[]
@ GHOST_kWindowStateMinimized
@ GHOST_kWindowStateMaximized
@ GHOST_kWindowStateNormal
@ GHOST_kWindowStateFullScreen
@ GHOST_kStandardCursorBottomLeftCorner
@ GHOST_kStandardCursorHelp
@ GHOST_kStandardCursorWait
@ GHOST_kStandardCursorTopSide
@ GHOST_kStandardCursorCrosshair
@ GHOST_kStandardCursorLeftRight
@ GHOST_kStandardCursorUpDown
@ GHOST_kStandardCursorBottomSide
@ GHOST_kStandardCursorTopLeftCorner
@ GHOST_kStandardCursorBottomRightCorner
@ GHOST_kStandardCursorDefault
@ GHOST_kStandardCursorRightSide
@ GHOST_kStandardCursorTopRightCorner
@ GHOST_kStandardCursorLeftSide
@ GHOST_kStandardCursorText
static const GHOST_TabletData GHOST_TABLET_DATA_NONE
GHOST_TDrawingContextType
@ GHOST_kWindowOrderBottom
#define _NET_WM_STATE_REMOVE
#define _NET_WM_STATE_ADD
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
void addDirtyWindow(GHOST_WindowX11 *bad_wind)
struct GHOST_SystemX11::@1504 m_atom
Atom _NET_WM_STATE_MAXIMIZED_VERT
GHOST_TSuccess setCursorPosition(int32_t x, int32_t y) override
Atom _NET_WM_STATE_FULLSCREEN
Atom _NET_WM_STATE_MAXIMIZED_HORZ
GHOST_TSuccess getCursorPosition(int32_t &x, int32_t &y) const override
GHOST_TSuccess showMessageBox(const char *title, const char *message, const char *help_label, const char *continue_label, const char *link, GHOST_DialogOptions dialog_options) const override
void set_progress(double progress)
void set_progress_enabled(bool enabled)
GHOST_TSuccess setDialogHints(GHOST_WindowX11 *parentWindow)
GHOST_Context * newDrawingContext(GHOST_TDrawingContextType type) override
GHOST_TSuccess beginFullScreen() const override
bool getValid() const override
void clientToScreen(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const override
GHOST_TSuccess endFullScreen() const override
GHOST_TSuccess setClientHeight(uint32_t height) override
void getWindowBounds(GHOST_Rect &bounds) const override
~GHOST_WindowX11() override
GHOST_TWindowState m_post_state
GHOST_TSuccess setState(GHOST_TWindowState state) override
GHOST_TSuccess endProgressBar() override
void getClientBounds(GHOST_Rect &bounds) const override
GHOST_WindowX11(GHOST_SystemX11 *system, Display *display, const char *title, int32_t left, int32_t top, uint32_t width, uint32_t height, GHOST_TWindowState state, GHOST_WindowX11 *parentWindow, GHOST_TDrawingContextType type, const bool is_dialog, const bool stereoVisual, const bool exclusive, const bool is_debug, const GHOST_GPUDevice &preferred_device)
void setTitle(const char *title) override
std::string getTitle() const override
GHOST_TSuccess setClientWidth(uint32_t width) override
GHOST_TSuccess setWindowCursorShape(GHOST_TStandardCursor shape) override
GHOST_TSuccess setProgressBar(float progress) override
GHOST_TSuccess hasCursorShape(GHOST_TStandardCursor shape) override
GHOST_TSuccess setWindowCustomCursorShape(uint8_t *bitmap, uint8_t *mask, int sizex, int sizey, int hotX, int hotY, bool canInvertColor) override
GHOST_TSuccess setClientSize(uint32_t width, uint32_t height) override
GHOST_TSuccess setOrder(GHOST_TWindowOrder order) override
GHOST_TSuccess setWindowCursorVisibility(bool visible) override
void screenToClient(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const override
bool isDialog() const override
uint16_t getDPIHint() override
GHOST_TSuccess setWindowCursorGrab(GHOST_TGrabCursorMode mode) override
GHOST_TSuccess invalidate() override
GHOST_TWindowState getState() const override
GHOST_Rect m_cursorGrabBounds
void setCursorGrabAccum(int32_t x, int32_t y)
GHOST_TGrabCursorMode m_cursorGrab
int32_t m_cursorGrabInitPos[2]
GHOST_TStandardCursor getCursorShape() const override
GHOST_TSuccess setDrawingContextType(GHOST_TDrawingContextType type) override
GHOST_TSuccess releaseNativeHandles()
virtual bool getValid() const override