summaryrefslogtreecommitdiff
path: root/platform/linuxbsd/display_server_x11.cpp
AgeCommit message (Collapse)Author
2022-02-16Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde
Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
2022-02-10Fix typos with codespellRémi Verschelde
Using codespell 2.2-dev from current git. Added `misc/scripts/codespell.sh` to make it easier to run it once in a while and update the skip and ignore lists.
2022-02-08[X11] Fix decoration reset when returning from fullscreen mode.bruvzg
2022-02-06Snap refresh rate to hundreths place on X11jordi
2022-02-04Merge pull request #57341 from bruvzg/win_multiwin_fsRémi Verschelde
2022-02-04Merge pull request #57617 from bruvzg/char_cleanupRémi Verschelde
2022-02-04Merge pull request #57335 from jordigcs/display-refresh-rateRémi Verschelde
2022-02-04[Windows] Add WS_BORDER flag to windows in WINDOW_MODE_FULLSCREEN mode to ↵bruvzg
allow multi-window interface in full-screen. [Windows] Add WINDOW_MODE_EXCLUSIVE_FULLSCREEN without WS_BORDER flag enabled (no multi-window support).
2022-02-04Cleanup and move char functions to the `char_utils.h` header.bruvzg
2022-02-03Add screen_get_refresh_rate to DisplayServerjordi
2022-02-01Fix captured mouse modeHendrik Brucker
2022-01-29simplify formatting scripts, add a clang-tidy script, and run clang-tidyNathan Franke
2022-01-27Merge pull request #56785 from bruvzg/nat_handles_4Rémi Verschelde
2022-01-24Merge pull request #56754 from madmiraal/fix-45592Rémi Verschelde
2022-01-20Rename or refactor macros to avoid leading underscoresOmar Polo
These are not used consistently and some can conflict with system-specific defines. While here, also delete some unused macros.
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-13Fix various typosluz paz
Found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inh,inout,leapyear,lod,nd,numer,ois,ony,paket,ro,seeked,sinc,switchs,te,uint,varn,vew`
2022-01-13Use mouse event relative motion to calculate mouse velocityMarcel Admiraal
2022-01-11Merge pull request #56322 from madmiraal/fix-42450Rémi Verschelde
2022-01-03Merge pull request #56438 from madmiraal/fix-56428Rémi Verschelde
Fix tablet tilt values returning bad values
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2022-01-02Fix tablet tilt values returning bad valuesMarcel Admiraal
2021-12-29Rename speed to velocity when it's a directional VectorMarcel Admiraal
2021-12-18Fix initialising of gl_manager and checking gl_manager and context_vulkan ↵Bastiaan Olij
preventing crash issues.
2021-11-23Rename `remove()` to `remove_at()` when removing by indexLightning_A
2021-11-12Use "enum class" for input enumsAaron Franke
2021-11-09Merge pull request #54315 from nekomatata/x11-key-events-logRémi Verschelde
2021-11-04Fix BadWindow X11 errors when a window is closed while processing strutsPouleyKetchoupp
A window can be closed on the server side while processing results from _NET_CLIENT_LIST, which causes BadWindow fatal errors by default in XGetWindowProperty. The only way to safely catch this case is to set an error handler to ignore BadWindow errors while these commands are processed.
2021-11-01Merge pull request #41565 from nekomatata/x11-usable-screen-sizeRémi Verschelde
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-29Implemented screen_get_usable_rect for X11 Display ServerPouleyKetchoupp
Helps with fixing issues with scrolling popups not respecting screen decorations on the display server side. Reproduction steps for a simple use case: - Start the editor project list - Open the language selection popup Support for multi-screen: Handling decorations is supported in different ways depending on the information the window manager provides: - _GTK_WORKAREAS is used when available from the WM to get accurate rect for the different screens directly (available on Gnome). - Alternatively, strut information is used to calculate available space for a given desktop manually (XFCE, KDE). - As last resort _NET_WORKAREA is used. It provides one full rect for all screens, which doesn't handle decorations on the secondary screen in all cases.
2021-10-28Merge pull request #42117 from nekomatata/x11-get-window-screenRémi Verschelde
Fix window_get_current_screen for X11 display server
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-28clang-format: Various fixes to comments alignment from `clang-format` 13Rémi Verschelde
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28clang-format: Disable alignment of operands, too unreliableRémi Verschelde
Sets `AlignOperands` to `DontAlign`. `clang-format` developers seem to mostly care about space-based indentation and every other version of clang-format breaks the bad mismatch of tabs and spaces that it seems to use for operand alignment. So it's better without, so that it respects our two-tabs `ContinuationIndentWidth`.
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-27Add KeyPress & KeyRelease events to X11 debug events loggingPouleyKetchoupp
Compiled out by default, just used for debugging local builds.
2021-10-23Fix primary clipboard warningConteZero
2021-10-18Added primary clipboard for LinuxConteZero
2021-10-01Merge pull request #52684 from Frixuu/masterRémi Verschelde
2021-09-30Use range iterators for `Map`Lightning_A
2021-09-21Allow for mapping keycodes to current layoutFrixuu
2021-09-15Mention that rebooting is required after updating graphics driver on LinuxHugo Locurcio
2021-08-13Add input buffering frameworkPedro J. Estébanez
Input buffering is implicitly used by event accumulation, but this commit makes it more generic so it can be enabled for other uses. For desktop OSs it's currently not feasible given main and UI threads are the same).
2021-08-13Improve input event accumulationPedro J. Estébanez
- API has been simplified: all events now go through `parse_input_event()`. Whether they are accumulated or not depends on the `use_accumulated_input` flag. - Event accumulation is now thread-safe (it was not needed so far, but it prepares the ground for the following changes). - Touch drag events now support accumulation.
2021-08-10Use Key enum instead of plain integersAaron Franke
2021-07-25Fix various typos with codespellluz paz
Found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,fave,findn,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint`