summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd/display_server_x11.cpp
Commit message (Collapse)AuthorAgeFilesLines
* linuxbsd: move all X11 stuff in its own directoryRiteo2022-11-021-5196/+0
| | | | | This allows implementing `DisplayServer`s like Wayland without making a mess in the source tree.
* Merge pull request #67790 from kdada/fix-flash-windowClay John2022-10-281-3/+8
|\ | | | | Make creating window do not flicker when specify custom position
| * Make window creation with custom position do not flashWei Guo2022-10-241-3/+8
| |
* | Fix `DisplayServer.has_feature()` claiming X11 has native icon supportHugo Locurcio2022-10-261-1/+1
|/ | | | | Native icons are not supported by the X11 DisplayServer, unlike Windows and macOS.
* Update the DisplayServer video driver error messageclayjohn2022-10-181-4/+15
| | | | to be more accurate and friendly
* Keep rendering context window size in sync when resizingNikola Bunjevac2022-10-111-0/+12
| | | | | | | On X11 we rely on ConfigureNotify event to update rendering context window size, but we don't get such event when resizing programmatically, only when done "manually" by resizing the window etc.
* SCons: Re-enable treating `#warning` as error with `werror`Rémi Verschelde2022-10-101-10/+0
| | | | | | | | Replace all TODO uses of `#warning` by proper TODO comments, and will open matching bug reports to keep track of them. We don't have a great track record fixing TODOs, but I'd wager we're even worse for fixing these "TODO #warning" so we should prohibit this usage.
* Merge pull request #66720 from qarmin/unintialized_memoryRémi Verschelde2022-10-051-2/+2
|\ | | | | | | Remove usage of unitialized variables
| * Remove usage of unitialized variablesRafał Mikrut2022-10-011-2/+2
| |
* | Unix: Remove now unnecessary I/O defines, cleanupRémi Verschelde2022-10-031-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `LIBC_FILEIO_ENABLED` wasn't defined anywhere, even in _other platforms_. - `NO_NETWORK` is also never defined. It probably isn't enough anyway to disable network APIs in the current codebase. - `UNIX_SOCKET_UNAVAILABLE` is never defined in this code but used by some other platforms, clarify that. - `NO_STATVFS` can be removed as Android supports it since API level 19, which is our current min SDK level. It's also only used for `DirAccessUnix::get_space_left()` which is anyway overridden by `DirAccessJAndroid::get_space_left()` so it shouldn't make a difference. * Fixed documentation for `DirAccess.get_space_left()`. - `NO_FCNTL` is likely also a remnant of early Android days, in current NDK r23 it seems to be available. Also cleaned up unused `fcntl.h` includes. - `NO_ALLOCA` is never defined, and we use alloca in many places now.
* | Fix inconsistent window state on X11.Matthew Munro (mam552)2022-10-011-0/+5
|/ | | | | | | | Fixes #66413. DisplayServerX11 tracks some internal state about whether the window is fullscreen, minimized, maximized or none. This commit queries the display server when the window changes, so that this internal state can be correctly updated.
* Merge pull request #65496 from MinusKube/popup-capture-mouse-bugRémi Verschelde2022-09-161-3/+23
|\ | | | | | | Fix MOUSE_MODE_CAPTURED not working correctly with popups
| * Fix MOUSE_MODE_CAPTURED not working correctly with popupsMinusKube2022-09-071-3/+23
| |
* | Merge pull request #64417 from aaronfranke/has-spaceRémi Verschelde2022-09-061-4/+4
|\ \ | | | | | | | | | Replace AABB/Rect2/Rect2i has_no_* methods with has_* methods
| * | Replace Rect2(i) has_no_area with has_areaAaron Franke2022-09-041-4/+4
| |/
* / Fix XSendEvent crash & bootsplash.MatthewZelriche2022-09-041-17/+8
|/ | | | | | | | | Fixes a crash due to an Xlib error, as well as ensures that Godot holds the correct size of the window after window modes have been applied, before exiting the DisplayServerX11 constructor. This ensures the bootsplash will be displayed with the correct dimensions. Fixes #65320
* Merge pull request #65283 from bruvzg/reenable_per_pix_transpRémi Verschelde2022-09-031-11/+44
|\ | | | | Re-enable per-pixel transparency support on Linux, macOS, and Windows.
| * Re-enable per-pixel transparency support on Linux, macOS, and Windows (for ↵bruvzg2022-09-031-11/+44
| | | | | | | | Vulkan and OpenGL rendering drivers).
* | Merge pull request #65111 from MatthewZelriche/DroppedXEventFixRémi Verschelde2022-09-031-4/+11
|\ \ | |/ |/| Fix dropped XEvents early in main window lifetime.
| * Fix dropped XEvents early in main window lifetime.MatthewZelriche2022-09-011-4/+11
| | | | | | | | | | | | | | | | | | | | The DisplayServerX11 constructor processes pending events shortly after constructing the main window. However, it discards pending events on the event queue that it is not interested in. This results in these events never making it to the main events thread and as a result are never processed. We need to save the events we don't handle in DisplayServerX11 so that they can be resent for later handling by the events thread.
* | Add support for system dark mode (Linux)Raul Santos2022-09-021-0/+25
|/ | | | - Use `org.freedesktop.appearance color-scheme` to support system dark mode.
* Fix minimize/maximize not taking effect in X11.MatthewZelriche2022-08-301-93/+88
| | | | | | | Attempts to construct an X11 window in an initial state of minimized/maximized would fail due to the window being unmapped. We simply check for failed mode changes during an unmap and reapply them if necessary.
* Fix fullscreen on X11.MatthewZelriche2022-08-291-0/+14
| | | | | | | | | | Attempts to set a Godot window to fullscreen prior to the window being mapped would silently fail. This commit uses _window_fullscreen_check to test if a window had been set to fullscreen while unmapped, and if so, resets it to fullscreen once the window has been successfully mapped. Fixes #54065
* Fix X11 menu window bug.MatthewZelriche2022-08-271-2/+10
| | | | | | | | Fixes an issue where XSetInputFocus fails due to the window not being viewable. Fixes #62635 Fixes #60690
* Replace Array return types with TypedArraykobewi2022-08-221-2/+2
|
* Only define `keep_screen_on` project setting onceRedMser2022-08-061-1/+1
|
* Remove Signal connect bindsJuan Linietsky2022-07-291-6/+6
| | | | | Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind(). Changed all uses of it to Callable.bind()
* [X11] Do case-insensitive search for pen inversion detectionHansem Ro2022-07-211-1/+1
|
* Improve DisplayServer.window_set_current_screenbruvzg2022-07-191-2/+2
| | | | | Prevent unnecessary fullscreen toggle animation on macOS, when screen is not changed Fix window position on Linux/X11
* Check if GL manager exist to prevent crash when using multithreaded renderer ↵bruvzg2022-07-061-2/+6
| | | | with Vulkan.
* Merge pull request #62212 from hansemro/eraser-detect-4Rémi Verschelde2022-07-041-2/+10
|\ | | | | Add inversion/eraser-end property for tablet pens
| * [macOS, Windows, X11] Add stylus inverted/eraser support toHansem Ro2022-07-041-2/+10
| | | | | | | | InputEventMouseMotion event
* | Properly check for fullscreen toggle made through the Window ManagerWilson E. Alvarez2022-06-301-0/+48
|/ | | | | | Fixes #40007. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* Remove mouse events that closed the popup from queue, to fix pop-up reopening.bruvzg2022-06-021-4/+11
|
* Add a new HashSet templatereduz2022-05-201-1/+1
| | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed
* Replace most uses of Map by HashMapreduz2022-05-161-14/+14
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Basic 3D renderingclayjohn2022-05-121-2/+2
|
* Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`Hugo Locurcio2022-05-031-1/+1
| | | | | | These typedefs don't save much typing compared to the full `Ref<Resource>` and `Ref<RefCounted>`, yet they sometimes introduce confusion among new contributors.
* Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde2022-05-021-28/+2
| | | | | | | | | | | Didn't commit all the changes where it wants to initialize a struct with `{}`. Should be reviewed in a separate PR. Option `IgnoreArrays` enabled for now to be conservative, can be disabled to see if it proposes more useful changes. Also fixed manually a handful of other missing initializations / moved some from constructors.
* Implement text-to-speech support on Android, iOS, HTML5, Linux, macOS and ↵bruvzg2022-04-281-0/+49
| | | | | | Windows. Implement TextServer word break method.
* Merge pull request #59979 from bruvzg/cpp_check2Rémi Verschelde2022-04-271-6/+5
|\
| * Fix more issues found by cppcheck.bruvzg2022-04-201-6/+5
| |
* | Merge pull request #58272 from bruvzg/x11_backup_screen_infoRémi Verschelde2022-04-271-6/+19
|\ \ | |/ |/|
| * [Linux/X11] Fallback to the X server root window to get screen rects, if ↵bruvzg2022-02-181-6/+19
| | | | | | | | Xinerama is not available.
* | Fix sub-menu keyboard navigation.bruvzg2022-04-131-1/+1
| |
* | Fix some issues found by cppcheck.bruvzg2022-04-061-2/+2
| |
* | Fix a possible race condition on popup close, that might cause multiple ↵bruvzg2022-04-051-10/+23
| | | | | | | | deletions of the same list item.
* | Fix X11 is_window_maximizedConteZero2022-03-311-2/+9
| |
* | Rename warp mouse functions to warp_mouseMarkus Sauermann2022-03-271-3/+3
| |
* | [X11] Do not try to focus unmapped window.bruvzg2022-03-081-2/+6
| |