summaryrefslogtreecommitdiff
path: root/platform/linuxbsd/display_server_x11.h
AgeCommit message (Collapse)Author
2022-07-04Merge pull request #62212 from hansemro/eraser-detect-4Rémi Verschelde
Add inversion/eraser-end property for tablet pens
2022-07-04[macOS, Windows, X11] Add stylus inverted/eraser support toHansem Ro
InputEventMouseMotion event
2022-06-30Properly check for fullscreen toggle made through the Window ManagerWilson E. Alvarez
Fixes #40007. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-06-02Remove mouse events that closed the popup from queue, to fix pop-up reopening.bruvzg
2022-05-20Add a new HashSet templatereduz
* Intended to replace RBSet in most cases. * Optimized for iteration speed
2022-05-16Replace most uses of Map by HashMapreduz
* 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!
2022-05-03Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`Hugo Locurcio
These typedefs don't save much typing compared to the full `Ref<Resource>` and `Ref<RefCounted>`, yet they sometimes introduce confusion among new contributors.
2022-05-02Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde
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.
2022-04-28Implement text-to-speech support on Android, iOS, HTML5, Linux, macOS and ↵bruvzg
Windows. Implement TextServer word break method.
2022-04-04Zero initialize all pointer class and struct membersRémi Verschelde
This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
2022-03-27Rename warp mouse functions to warp_mouseMarkus Sauermann
2022-02-25Improve popup window handling.bruvzg
Add window FLAG_POPUP and a platform specific routines to control popup auto-hiding and event forwarding.
2022-02-04Merge pull request #57335 from jordigcs/display-refresh-rateRémi Verschelde
2022-02-03Add screen_get_refresh_rate to DisplayServerjordi
2022-02-01Merge pull request #57497 from Geometror/fix-mouse-modeRémi Verschelde
2022-02-01Fix captured mouse modeHendrik Brucker
2022-01-31Merge pull request #56548 from madmiraal/fix-53894Rémi Verschelde
2022-01-27Merge pull request #56785 from bruvzg/nat_handles_4Rémi Verschelde
2022-01-18Window management improvements.bruvzg
[macOS] Fix transient windows not working in the full-screen mode. [macOS] Fix moving transient windows to the other screen than parent window. [macOS] Fix popup menu switch on hover. [macOS] Use content origin rect for windows position (to ensure `DS.mouse_get_position` is equal to `DS.window_get_position` + mouse position from the input events). [macOS] Fix incorrect input coordinates, when external display with different scaling in connected/disconnected. [macOS/Windows] Fix moving fullscreen windows between the screens. Add auto refocusing of the parent window, when the focused transient window is closed. Remove redundant `DS.mouse_get_absolute_position` function (returns mouse position in the screen coordinates, same as `DS.mouse_get_position`).
2022-01-14Add support for getting native display, window, and view handles.bruvzg
2022-01-11New OpenGL batching canvas rendererclayjohn
2022-01-06Set window to focused when createdMarcel Admiraal
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-11-12Use "enum class" for input enumsAaron Franke
2021-10-31Use OpenGL 3.3 core profile instead of compatibility profileClay John
- Rename OpenGL to GLES3 in the source code per community feedback. - The renderer is still exposed as "OpenGL 3" to the user. - Hide renderer selection dropdown until OpenGL support is more mature. - The renderer can still be changed in the Project Settings or using the `--rendering-driver opengl` command line argument. - Remove commented out exporter code. - Remove some OpenGL/DisplayServer-related debugging prints.
2021-10-30Rename GLES2 driver to OpenGL to prepare for the upgrade to GLES3Hugo Locurcio
- Use lowercase driver names for the `--rendering-driver` command line argument.
2021-10-30Add GLES2 2D renderer + Linux display managerlawnjelly
First implementation with Linux display manager. - Add single-threaded mode for EditorResourcePreview (needed for OpenGL). Co-authored-by: clayjohn <claynjohn@gmail.com> Co-authored-by: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>
2021-10-28Fix window_get_current_screen for X11 display serverPouleyKetchoupp
This method used to check which screen contains the top-left corner of the window (and default to the first screen in case none is found), which is not accurate in some cases. Now the area of overlap with each screen is calculated, so we can get the best candidate based on the window's position. This makes window_get_current_screen consistent with Windows platform, and fixes an issue where popups appear on the main screen when the main window is slightly moved outside of the desktop on the top or left.
2021-10-27Fix input events random delay on X11PouleyKetchoupp
The new system based on a thread gathering events from the X11 server was causing delays in some scenarios where some events have just been missed at the time of processing and we're waiting for a whole frame to check them again. Solved by flushing again and checking for pending events at the beginning of the process loop, in addition to events already gathered on the event thread.
2021-10-18Added primary clipboard for LinuxConteZero
2021-09-21Allow for mapping keycodes to current layoutFrixuu
2021-07-22Move `alert` function from `DisplayServer` to `OS`.bruvzg
2021-07-16Modernize Display server to use override keywordHendrik Brucker
2021-07-06Restructure and reimplement vsync optionsHendrik Brucker
-Add a v-sync mode setting which allows to choose between DISABLED, ON, ADAPTIVE and MAILBOX -Removed the V-Sync via Compositor option
2021-06-20Add "Keep screen on" feature to `DisplayServerX11`Niklas Higi
2021-06-20Use mouse and joypad enums instead of plain integersAaron Franke
Also MIDIMessage
2021-02-18Modernize atomicsPedro J. Estébanez
- Based on C++11's `atomic` - Reworked `SafeRefCount` (based on the rewrite by @hpvb) - Replaced free atomic functions by the new `SafeNumeric<T>` - Replaced wrong cases of `volatile bool` by the new `SafeFlag` - Platform-specific implementations no longer needed Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
2021-01-29Modernize ThreadPedro J. Estébanez
- Based on C++11's `thread` and `thread_local` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed (except for the few cases of non-portable functions) - Simpler for `NO_THREADS` - Thread ids are now the same across platforms (main is 1; others follow)
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-16Fix named anonymous struct warningMarcel Admiraal
2020-12-08Merge pull request #43742 from qarmin/editor_modules_default_valuesRémi Verschelde
Initialize class/struct variables with default values in platform/ and editor/
2020-12-04RenderingServer reorganizationreduz
2020-12-02Initialize class/struct variables with default values in platform/ and editor/Rafał Mikrut
2020-11-27Implement INCR mechanism for Linux clipboardPouleyKetchoupp
Allows pasting from x11 clipboard to receive data incrementally, which is required when handling data size > 256KB.
2020-11-26Merge pull request #42652 from nekomatata/x11-clipboard-save-targetsRémi Verschelde
Implement SAVE_TARGETS mechanism for Linux clipboard
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-10-09Implement SAVE_TARGETS mechanism for Linux clipboardPouleyKetchoupp
Allows sending the clipboard content to the clipboard manager on exit to keep the content when using a clipboard manager that doesn't automatically makes a backup when copying. MULTIPLE selection mechanism also had to be implemented, because in this case, the clipboard manager might request multiple selection targets at once. Known use case: Ubuntu with XFCE4
2020-09-25Fix delay to process clipboard content from Godot in other programsPouleyKetchoupp
When pasting clipboard content from Godot to other applications, multiple SelectionRequest events are sent to Godot in order to access the data. It could take a long time before the data is ready for the other app because events were processed one by one on the main thread, especially when Godot is unfocused and runs at low frequency. With this change, SelectionRequest events are directly handled on the separate event polling thread to minimize this delay. This change also replaces clipboard_get() calls in SelectionRequest with a direct access to internal_clipboard, since in this case we know Godot is the owner of the clipboard content and it's not necessary to query the x server for it.
2020-09-24Fix general keyboard input lag on X11 display serverPouleyKetchoupp
This change makes keyboard inputs more responsive on Linux, especially when the FPS is lower on slower configurations. Polling events from the x server is done on a separate thread to avoid a frame delay with inputs, due to first sending the event to the input manager with XFilterEvent then processing the new event only on the next frame. Calls to Input Manager functions like XSetICFocus, XUnsetICFocus and XSetICValues use a mutex, because they are polling events internally and would otherwise interfere with our own thread process for polling events which can cause a deadlock in some cases. XUnsetICFocus is called instead of XSetICFocus on FocusOut events, so the input manager can be properly notified of focus changes. clipboard_get now uses a blocking call to poll for a specific event type when waiting for a SelectionNotify event, instead of polling all events and filtering them afterwards.
2020-09-17Add window click-through support.bruvzg