Lines Matching refs:window
136 // Waits until a VisibilityNotify event arrives for the specified window or the
139 static GLFWbool waitForVisibilityNotify(_GLFWwindow* window)
145 window->x11.handle,
156 // Returns whether the window is iconified
158 static int getWindowState(_GLFWwindow* window)
166 if (_glfwGetWindowPropertyX11(window->x11.handle,
184 if (event->xany.window != _glfw.x11.helperWindowHandle)
192 // Returns whether it is a _NET_FRAME_EXTENTS event for the specified window
196 _GLFWwindow* window = (_GLFWwindow*) pointer;
199 event->xproperty.window == window->x11.handle &&
210 event->xproperty.window == notification->xselection.requestor &&
247 // Sends an EWMH or ICCCM event to the window manager
249 static void sendEventToWM(_GLFWwindow* window, Atom type,
253 event.xclient.window = window->x11.handle;
268 // Updates the normal hints according to the window settings
270 static void updateNormalHints(_GLFWwindow* window, int width, int height)
275 XGetWMNormalHints(_glfw.x11.display, window->x11.handle, hints, &supplied);
279 if (!window->monitor)
281 if (window->resizable)
283 if (window->minwidth != GLFW_DONT_CARE &&
284 window->minheight != GLFW_DONT_CARE)
287 hints->min_width = window->minwidth;
288 hints->min_height = window->minheight;
291 if (window->maxwidth != GLFW_DONT_CARE &&
292 window->maxheight != GLFW_DONT_CARE)
295 hints->max_width = window->maxwidth;
296 hints->max_height = window->maxheight;
299 if (window->numer != GLFW_DONT_CARE &&
300 window->denom != GLFW_DONT_CARE)
303 hints->min_aspect.x = hints->max_aspect.x = window->numer;
304 hints->min_aspect.y = hints->max_aspect.y = window->denom;
315 XSetWMNormalHints(_glfw.x11.display, window->x11.handle, hints);
319 // Updates the full screen status of the window
321 static void updateWindowMode(_GLFWwindow* window)
323 if (window->monitor)
328 sendEventToWM(window,
330 window->monitor->x11.index,
331 window->monitor->x11.index,
332 window->monitor->x11.index,
333 window->monitor->x11.index,
339 sendEventToWM(window,
347 // This is the butcher's way of removing window decorations
348 // Setting the override-redirect attribute on a window makes the
349 // window manager ignore the window completely (ICCCM, section 4)
353 // all, as those are tasks usually performed by the window manager
358 window->x11.handle,
362 window->x11.overrideRedirect = GLFW_TRUE;
366 if (!window->x11.transparent)
370 XChangeProperty(_glfw.x11.display, window->x11.handle,
380 XDeleteProperty(_glfw.x11.display, window->x11.handle,
386 sendEventToWM(window,
397 window->x11.handle,
401 window->x11.overrideRedirect = GLFW_FALSE;
405 if (!window->x11.transparent)
407 XDeleteProperty(_glfw.x11.display, window->x11.handle,
457 static void updateCursorImage(_GLFWwindow* window)
459 if (window->cursorMode == GLFW_CURSOR_NORMAL ||
460 window->cursorMode == GLFW_CURSOR_CAPTURED)
462 if (window->cursor)
464 XDefineCursor(_glfw.x11.display, window->x11.handle,
465 window->cursor->x11.handle);
468 XUndefineCursor(_glfw.x11.display, window->x11.handle);
472 XDefineCursor(_glfw.x11.display, window->x11.handle,
477 // Grabs the cursor and confines it to the window
479 static void captureCursor(_GLFWwindow* window)
481 XGrabPointer(_glfw.x11.display, window->x11.handle, True,
484 window->x11.handle,
498 static void enableRawMouseMotion(_GLFWwindow* window)
513 static void disableRawMouseMotion(_GLFWwindow* window)
525 // Apply disabled cursor mode to a focused window
527 static void disableCursor(_GLFWwindow* window)
529 if (window->rawMouseMotion)
530 enableRawMouseMotion(window);
532 _glfw.x11.disabledCursorWindow = window;
533 _glfwGetCursorPosX11(window,
536 updateCursorImage(window);
537 _glfwCenterCursorInContentArea(window);
538 captureCursor(window);
541 // Exit disabled cursor mode for the specified window
543 static void enableCursor(_GLFWwindow* window)
545 if (window->rawMouseMotion)
546 disableRawMouseMotion(window);
550 _glfwSetCursorPosX11(window,
553 updateCursorImage(window);
560 _GLFWwindow* window = (_GLFWwindow*) clientData;
561 window->x11.ic = NULL;
564 // Create the X11 window (and its colormap)
566 static GLFWbool createNativeWindow(_GLFWwindow* window,
588 window->x11.colormap = XCreateColormap(_glfw.x11.display,
593 window->x11.transparent = _glfwIsVisualTransparentX11(visual);
596 wa.colormap = window->x11.colormap;
604 window->x11.parent = _glfw.x11.root;
605 window->x11.handle = XCreateWindow(_glfw.x11.display,
618 if (!window->x11.handle)
621 "X11: Failed to create window");
626 window->x11.handle,
628 (XPointer) window);
631 _glfwSetWindowDecoratedX11(window, GLFW_FALSE);
633 if (_glfw.x11.NET_WM_STATE && !window->monitor)
651 window->x11.maximized = GLFW_TRUE;
657 XChangeProperty(_glfw.x11.display, window->x11.handle,
671 XSetWMProtocols(_glfw.x11.display, window->x11.handle,
679 XChangeProperty(_glfw.x11.display, window->x11.handle,
688 XChangeProperty(_glfw.x11.display, window->x11.handle,
706 XSetWMHints(_glfw.x11.display, window->x11.handle, hints);
738 XSetWMNormalHints(_glfw.x11.display, window->x11.handle, hints);
768 XSetClassHint(_glfw.x11.display, window->x11.handle, hint);
775 XChangeProperty(_glfw.x11.display, window->x11.handle,
781 _glfwCreateInputContextX11(window);
783 _glfwSetWindowTitleX11(window, wndconfig->title);
784 _glfwGetWindowPosX11(window, &window->x11.xpos, &window->x11.ypos);
785 _glfwGetWindowSizeX11(window, &window->x11.width, &window->x11.height);
954 // string into a window property and then read it back, just return it
1082 // Make the specified window and its video mode active on its monitor
1084 static void acquireMonitor(_GLFWwindow* window)
1100 if (!window->monitor->window)
1103 _glfwSetVideoModeX11(window->monitor, &window->videoMode);
1105 if (window->x11.overrideRedirect)
1110 // Manually position the window over its monitor
1111 _glfwGetMonitorPosX11(window->monitor, &xpos, &ypos);
1112 _glfwGetVideoModeX11(window->monitor, &mode);
1114 XMoveResizeWindow(_glfw.x11.display, window->x11.handle,
1118 _glfwInputMonitorWindow(window->monitor, window);
1121 // Remove the window and restore the original video mode
1123 static void releaseMonitor(_GLFWwindow* window)
1125 if (window->monitor->window != window)
1128 _glfwInputMonitorWindow(window->monitor, NULL);
1129 _glfwRestoreVideoModeX11(window->monitor);
1185 _GLFWwindow* window = _glfw.x11.disabledCursorWindow;
1187 if (window &&
1188 window->rawMouseMotion &&
1197 double xpos = window->virtualCursorPosX;
1198 double ypos = window->virtualCursorPosY;
1209 _glfwInputCursorPos(window, xpos, ypos);
1225 _GLFWwindow* window = NULL;
1227 event->xany.window,
1229 (XPointer*) &window) != 0)
1231 // This is an event for a window that has already been destroyed
1239 window->x11.parent = event->xreparent.parent;
1249 if (window->x11.ic)
1258 Time diff = event->xkey.time - window->x11.keyPressTimes[keycode];
1262 _glfwInputKey(window, key, keycode, GLFW_PRESS, mods);
1264 window->x11.keyPressTimes[keycode] = event->xkey.time;
1274 count = Xutf8LookupString(window->x11.ic,
1282 count = Xutf8LookupString(window->x11.ic,
1293 _glfwInputChar(window, decodeUTF8(&c), mods, plain);
1305 _glfwInputKey(window, key, keycode, GLFW_PRESS, mods);
1309 _glfwInputChar(window, codepoint, mods, plain);
1332 next.xkey.window == event->xkey.window &&
1352 _glfwInputKey(window, key, keycode, GLFW_RELEASE, mods);
1361 _glfwInputMouseClick(window, GLFW_MOUSE_BUTTON_LEFT, GLFW_PRESS, mods);
1363 _glfwInputMouseClick(window, GLFW_MOUSE_BUTTON_MIDDLE, GLFW_PRESS, mods);
1365 _glfwInputMouseClick(window, GLFW_MOUSE_BUTTON_RIGHT, GLFW_PRESS, mods);
1369 _glfwInputScroll(window, 0.0, 1.0);
1371 _glfwInputScroll(window, 0.0, -1.0);
1373 _glfwInputScroll(window, 1.0, 0.0);
1375 _glfwInputScroll(window, -1.0, 0.0);
1381 _glfwInputMouseClick(window,
1396 _glfwInputMouseClick(window,
1403 _glfwInputMouseClick(window,
1410 _glfwInputMouseClick(window,
1419 _glfwInputMouseClick(window,
1436 if (window->cursorMode == GLFW_CURSOR_HIDDEN)
1437 updateCursorImage(window);
1439 _glfwInputCursorEnter(window, GLFW_TRUE);
1440 _glfwInputCursorPos(window, x, y);
1442 window->x11.lastCursorPosX = x;
1443 window->x11.lastCursorPosY = y;
1449 _glfwInputCursorEnter(window, GLFW_FALSE);
1458 if (x != window->x11.warpCursorPosX ||
1459 y != window->x11.warpCursorPosY)
1463 if (window->cursorMode == GLFW_CURSOR_DISABLED)
1465 if (_glfw.x11.disabledCursorWindow != window)
1467 if (window->rawMouseMotion)
1470 const int dx = x - window->x11.lastCursorPosX;
1471 const int dy = y - window->x11.lastCursorPosY;
1473 _glfwInputCursorPos(window,
1474 window->virtualCursorPosX + dx,
1475 window->virtualCursorPosY + dy);
1478 _glfwInputCursorPos(window, x, y);
1481 window->x11.lastCursorPosX = x;
1482 window->x11.lastCursorPosY = y;
1488 if (event->xconfigure.width != window->x11.width ||
1489 event->xconfigure.height != window->x11.height)
1491 window->x11.width = event->xconfigure.width;
1492 window->x11.height = event->xconfigure.height;
1494 _glfwInputFramebufferSize(window,
1498 _glfwInputWindowSize(window,
1509 if (!event->xany.send_event && window->x11.parent != _glfw.x11.root)
1515 window->x11.parent,
1526 if (xpos != window->x11.xpos || ypos != window->x11.ypos)
1528 window->x11.xpos = xpos;
1529 window->x11.ypos = ypos;
1531 _glfwInputWindowPos(window, xpos, ypos);
1539 // Custom client message, probably from the window manager
1555 // The window manager was asked to close the window, for
1556 // example by the user pressing a 'close' window decoration
1558 _glfwInputWindowCloseRequest(window);
1562 // The window manager is pinging the application to ensure
1566 reply.xclient.window = _glfw.x11.root;
1576 // A drag operation has entered the window
1615 // The drag operation has finished by dropping on the window
1626 // Request the chosen format from the source window
1631 window->x11.handle,
1637 reply.xclient.window = _glfw.x11.xdnd.source;
1640 reply.xclient.data.l[0] = window->x11.handle;
1651 // The drag operation has moved over the window
1662 window->x11.handle,
1667 _glfwInputCursorPos(window, xpos, ypos);
1670 reply.xclient.window = _glfw.x11.xdnd.source;
1673 reply.xclient.data.l[0] = window->x11.handle;
1710 _glfwInputDrop(window, count, (const char**) paths);
1723 reply.xclient.window = _glfw.x11.xdnd.source;
1726 reply.xclient.data.l[0] = window->x11.handle;
1744 // Ignore focus events from popup indicator windows, window menu
1745 // key chords and window dragging
1749 if (window->cursorMode == GLFW_CURSOR_DISABLED)
1750 disableCursor(window);
1751 else if (window->cursorMode == GLFW_CURSOR_CAPTURED)
1752 captureCursor(window);
1754 if (window->x11.ic)
1755 XSetICFocus(window->x11.ic);
1757 _glfwInputWindowFocus(window, GLFW_TRUE);
1766 // Ignore focus events from popup indicator windows, window menu
1767 // key chords and window dragging
1771 if (window->cursorMode == GLFW_CURSOR_DISABLED)
1772 enableCursor(window);
1773 else if (window->cursorMode == GLFW_CURSOR_CAPTURED)
1776 if (window->x11.ic)
1777 XUnsetICFocus(window->x11.ic);
1779 if (window->monitor && window->autoIconify)
1780 _glfwIconifyWindowX11(window);
1782 _glfwInputWindowFocus(window, GLFW_FALSE);
1788 _glfwInputWindowDamage(window);
1799 const int state = getWindowState(window);
1804 if (window->x11.iconified != iconified)
1806 if (window->monitor)
1809 releaseMonitor(window);
1811 acquireMonitor(window);
1814 window->x11.iconified = iconified;
1815 _glfwInputWindowIconify(window, iconified);
1820 const GLFWbool maximized = _glfwWindowMaximizedX11(window);
1821 if (window->x11.maximized != maximized)
1823 window->x11.maximized = maximized;
1824 _glfwInputWindowMaximize(window, maximized);
1841 // Retrieve a single window property of the specified type
1844 unsigned long _glfwGetWindowPropertyX11(Window window,
1854 window,
1922 void _glfwCreateInputContextX11(_GLFWwindow* window)
1926 callback.client_data = (XPointer) window;
1928 window->x11.ic = XCreateIC(_glfw.x11.im,
1932 window->x11.handle,
1934 window->x11.handle,
1939 if (window->x11.ic)
1942 XGetWindowAttributes(_glfw.x11.display, window->x11.handle, &attribs);
1945 if (XGetICValues(window->x11.ic, XNFilterEvents, &filter, NULL) == NULL)
1948 window->x11.handle,
1959 GLFWbool _glfwCreateWindowX11(_GLFWwindow* window,
1996 if (!createNativeWindow(window, wndconfig, visual, depth))
2003 if (!_glfwCreateContextGLX(window, ctxconfig, fbconfig))
2008 if (!_glfwCreateContextEGL(window, ctxconfig, fbconfig))
2013 if (!_glfwCreateContextOSMesa(window, ctxconfig, fbconfig))
2017 if (!_glfwRefreshContextAttribs(window, ctxconfig))
2022 _glfwSetWindowMousePassthroughX11(window, GLFW_TRUE);
2024 if (window->monitor)
2026 _glfwShowWindowX11(window);
2027 updateWindowMode(window);
2028 acquireMonitor(window);
2031 _glfwCenterCursorInContentArea(window);
2037 _glfwShowWindowX11(window);
2039 _glfwFocusWindowX11(window);
2047 void _glfwDestroyWindowX11(_GLFWwindow* window)
2049 if (_glfw.x11.disabledCursorWindow == window)
2050 enableCursor(window);
2052 if (window->monitor)
2053 releaseMonitor(window);
2055 if (window->x11.ic)
2057 XDestroyIC(window->x11.ic);
2058 window->x11.ic = NULL;
2061 if (window->context.destroy)
2062 window->context.destroy(window);
2064 if (window->x11.handle)
2066 XDeleteContext(_glfw.x11.display, window->x11.handle, _glfw.x11.context);
2067 XUnmapWindow(_glfw.x11.display, window->x11.handle);
2068 XDestroyWindow(_glfw.x11.display, window->x11.handle);
2069 window->x11.handle = (Window) 0;
2072 if (window->x11.colormap)
2074 XFreeColormap(_glfw.x11.display, window->x11.colormap);
2075 window->x11.colormap = (Colormap) 0;
2081 void _glfwSetWindowTitleX11(_GLFWwindow* window, const char* title)
2086 window->x11.handle,
2092 XChangeProperty(_glfw.x11.display, window->x11.handle,
2097 XChangeProperty(_glfw.x11.display, window->x11.handle,
2105 void _glfwSetWindowIconX11(_GLFWwindow* window, int count, const GLFWimage* images)
2137 XChangeProperty(_glfw.x11.display, window->x11.handle,
2148 XDeleteProperty(_glfw.x11.display, window->x11.handle,
2155 void _glfwGetWindowPosX11(_GLFWwindow* window, int* xpos, int* ypos)
2160 XTranslateCoordinates(_glfw.x11.display, window->x11.handle, _glfw.x11.root,
2169 void _glfwSetWindowPosX11(_GLFWwindow* window, int xpos, int ypos)
2173 if (!_glfwWindowVisibleX11(window))
2178 if (XGetWMNormalHints(_glfw.x11.display, window->x11.handle, hints, &supplied))
2183 XSetWMNormalHints(_glfw.x11.display, window->x11.handle, hints);
2189 XMoveWindow(_glfw.x11.display, window->x11.handle, xpos, ypos);
2193 void _glfwGetWindowSizeX11(_GLFWwindow* window, int* width, int* height)
2196 XGetWindowAttributes(_glfw.x11.display, window->x11.handle, &attribs);
2204 void _glfwSetWindowSizeX11(_GLFWwindow* window, int width, int height)
2206 if (window->monitor)
2208 if (window->monitor->window == window)
2209 acquireMonitor(window);
2213 if (!window->resizable)
2214 updateNormalHints(window, width, height);
2216 XResizeWindow(_glfw.x11.display, window->x11.handle, width, height);
2222 void _glfwSetWindowSizeLimitsX11(_GLFWwindow* window,
2227 _glfwGetWindowSizeX11(window, &width, &height);
2228 updateNormalHints(window, width, height);
2232 void _glfwSetWindowAspectRatioX11(_GLFWwindow* window, int numer, int denom)
2235 _glfwGetWindowSizeX11(window, &width, &height);
2236 updateNormalHints(window, width, height);
2240 void _glfwGetFramebufferSizeX11(_GLFWwindow* window, int* width, int* height)
2242 _glfwGetWindowSizeX11(window, width, height);
2245 void _glfwGetWindowFrameSizeX11(_GLFWwindow* window,
2251 if (window->monitor || !window->decorated)
2257 if (!_glfwWindowVisibleX11(window) &&
2264 // function before the window is mapped
2265 sendEventToWM(window, _glfw.x11.NET_REQUEST_FRAME_EXTENTS,
2268 // HACK: Use a timeout because earlier versions of some window managers
2271 // If you are affected by this and your window manager is NOT
2276 (XPointer) window))
2281 "X11: The window manager has a broken _NET_REQUEST_FRAME_EXTENTS implementation; please report this issue");
2287 if (_glfwGetWindowPropertyX11(window->x11.handle,
2306 void _glfwGetWindowContentScaleX11(_GLFWwindow* window, float* xscale, float* yscale)
2314 void _glfwIconifyWindowX11(_GLFWwindow* window)
2316 if (window->x11.overrideRedirect)
2319 // tasks are performed by the window manager
2325 XIconifyWindow(_glfw.x11.display, window->x11.handle, _glfw.x11.screen);
2329 void _glfwRestoreWindowX11(_GLFWwindow* window)
2331 if (window->x11.overrideRedirect)
2334 // tasks are performed by the window manager
2340 if (_glfwWindowIconifiedX11(window))
2342 XMapWindow(_glfw.x11.display, window->x11.handle);
2343 waitForVisibilityNotify(window);
2345 else if (_glfwWindowVisibleX11(window))
2351 sendEventToWM(window,
2363 void _glfwMaximizeWindowX11(_GLFWwindow* window)
2372 if (_glfwWindowVisibleX11(window))
2374 sendEventToWM(window,
2385 _glfwGetWindowPropertyX11(window->x11.handle,
2418 XChangeProperty(_glfw.x11.display, window->x11.handle,
2428 void _glfwShowWindowX11(_GLFWwindow* window)
2430 if (_glfwWindowVisibleX11(window))
2433 XMapWindow(_glfw.x11.display, window->x11.handle);
2434 waitForVisibilityNotify(window);
2437 void _glfwHideWindowX11(_GLFWwindow* window)
2439 XUnmapWindow(_glfw.x11.display, window->x11.handle);
2443 void _glfwRequestWindowAttentionX11(_GLFWwindow* window)
2448 sendEventToWM(window,
2455 void _glfwFocusWindowX11(_GLFWwindow* window)
2458 sendEventToWM(window, _glfw.x11.NET_ACTIVE_WINDOW, 1, 0, 0, 0, 0);
2459 else if (_glfwWindowVisibleX11(window))
2461 XRaiseWindow(_glfw.x11.display, window->x11.handle);
2462 XSetInputFocus(_glfw.x11.display, window->x11.handle,
2469 void _glfwSetWindowMonitorX11(_GLFWwindow* window,
2475 if (window->monitor == monitor)
2479 if (monitor->window == window)
2480 acquireMonitor(window);
2484 if (!window->resizable)
2485 updateNormalHints(window, width, height);
2487 XMoveResizeWindow(_glfw.x11.display, window->x11.handle,
2495 if (window->monitor)
2497 _glfwSetWindowDecoratedX11(window, window->decorated);
2498 _glfwSetWindowFloatingX11(window, window->floating);
2499 releaseMonitor(window);
2502 _glfwInputWindowMonitor(window, monitor);
2503 updateNormalHints(window, width, height);
2505 if (window->monitor)
2507 if (!_glfwWindowVisibleX11(window))
2509 XMapRaised(_glfw.x11.display, window->x11.handle);
2510 waitForVisibilityNotify(window);
2513 updateWindowMode(window);
2514 acquireMonitor(window);
2518 updateWindowMode(window);
2519 XMoveResizeWindow(_glfw.x11.display, window->x11.handle,
2526 GLFWbool _glfwWindowFocusedX11(_GLFWwindow* window)
2532 return window->x11.handle == focused;
2535 GLFWbool _glfwWindowIconifiedX11(_GLFWwindow* window)
2537 return getWindowState(window) == IconicState;
2540 GLFWbool _glfwWindowVisibleX11(_GLFWwindow* window)
2543 XGetWindowAttributes(_glfw.x11.display, window->x11.handle, &wa);
2547 GLFWbool _glfwWindowMaximizedX11(_GLFWwindow* window)
2560 _glfwGetWindowPropertyX11(window->x11.handle,
2581 GLFWbool _glfwWindowHoveredX11(_GLFWwindow* window)
2602 else if (w == window->x11.handle)
2609 GLFWbool _glfwFramebufferTransparentX11(_GLFWwindow* window)
2611 if (!window->x11.transparent)
2617 void _glfwSetWindowResizableX11(_GLFWwindow* window, GLFWbool enabled)
2620 _glfwGetWindowSizeX11(window, &width, &height);
2621 updateNormalHints(window, width, height);
2624 void _glfwSetWindowDecoratedX11(_GLFWwindow* window, GLFWbool enabled)
2638 XChangeProperty(_glfw.x11.display, window->x11.handle,
2646 void _glfwSetWindowFloatingX11(_GLFWwindow* window, GLFWbool enabled)
2651 if (_glfwWindowVisibleX11(window))
2654 sendEventToWM(window,
2664 _glfwGetWindowPropertyX11(window->x11.handle,
2684 XChangeProperty(_glfw.x11.display, window->x11.handle,
2698 XChangeProperty(_glfw.x11.display, window->x11.handle,
2713 void _glfwSetWindowMousePassthroughX11(_GLFWwindow* window, GLFWbool enabled)
2721 XShapeCombineRegion(_glfw.x11.display, window->x11.handle,
2727 XShapeCombineMask(_glfw.x11.display, window->x11.handle,
2732 float _glfwGetWindowOpacityX11(_GLFWwindow* window)
2740 if (_glfwGetWindowPropertyX11(window->x11.handle,
2755 void _glfwSetWindowOpacityX11(_GLFWwindow* window, float opacity)
2758 XChangeProperty(_glfw.x11.display, window->x11.handle,
2763 void _glfwSetRawMouseMotionX11(_GLFWwindow *window, GLFWbool enabled)
2768 if (_glfw.x11.disabledCursorWindow != window)
2772 enableRawMouseMotion(window);
2774 disableRawMouseMotion(window);
2799 _GLFWwindow* window = _glfw.x11.disabledCursorWindow;
2800 if (window)
2803 _glfwGetWindowSizeX11(window, &width, &height);
2807 if (window->x11.lastCursorPosX != width / 2 ||
2808 window->x11.lastCursorPosY != height / 2)
2810 _glfwSetCursorPosX11(window, width / 2, height / 2);
2834 void _glfwGetCursorPosX11(_GLFWwindow* window, double* xpos, double* ypos)
2840 XQueryPointer(_glfw.x11.display, window->x11.handle,
2851 void _glfwSetCursorPosX11(_GLFWwindow* window, double x, double y)
2854 window->x11.warpCursorPosX = (int) x;
2855 window->x11.warpCursorPosY = (int) y;
2857 XWarpPointer(_glfw.x11.display, None, window->x11.handle,
2862 void _glfwSetCursorModeX11(_GLFWwindow* window, int mode)
2864 if (_glfwWindowFocusedX11(window))
2868 _glfwGetCursorPosX11(window,
2871 _glfwCenterCursorInContentArea(window);
2872 if (window->rawMouseMotion)
2873 enableRawMouseMotion(window);
2875 else if (_glfw.x11.disabledCursorWindow == window)
2877 if (window->rawMouseMotion)
2878 disableRawMouseMotion(window);
2882 captureCursor(window);
2887 _glfw.x11.disabledCursorWindow = window;
2888 else if (_glfw.x11.disabledCursorWindow == window)
2891 _glfwSetCursorPosX11(window,
2897 updateCursorImage(window);
3053 void _glfwSetCursorX11(_GLFWwindow* window, _GLFWcursor* cursor)
3055 if (window->cursorMode == GLFW_CURSOR_NORMAL ||
3056 window->cursorMode == GLFW_CURSOR_CAPTURED)
3058 updateCursorImage(window);
3128 EGLNativeWindowType _glfwGetEGLNativeWindowX11(_GLFWwindow* window)
3131 return &window->x11.handle;
3133 return (EGLNativeWindowType) window->x11.handle;
3211 _GLFWwindow* window,
3241 sci.window = window->x11.handle;
3271 sci.window = window->x11.handle;
3313 _GLFWwindow* window = (_GLFWwindow*) handle;
3314 assert(window != NULL);
3316 return window->x11.handle;