Commit graph

22 commits

Author SHA1 Message Date
Rémi Verschelde
68d71f88f5
Improve DisplayServer message for video card drivers failure
And remove leftover duplicated message on Android.
2023-01-17 15:41:54 +01:00
bruvzg
60e0043012
Fix X11 input region size. 2023-01-17 07:54:54 +02:00
bruvzg
34b34b104c
Add WINDOW_FLAG_MOUSE_PASSTHROUGH flag and enabled it for tooltips. Expose window_set_mouse_passthrough to Window. 2023-01-16 11:42:49 +02:00
Juan Linietsky
2b815df3c1 Use BitField<> in core type masks
* All core types masks are now correctly marked as bitfields.
* The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks.
* Most bitmask operations replaced by functions in BitField<>
* Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is.
* Documentation and API dump updated to reflect bitfields in core types.
2023-01-08 22:17:40 +01:00
bruvzg
2718a7b7d3
Add support for the custom initial screen for the main window, fix primary screen detection. 2023-01-07 11:14:35 +02:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
bruvzg
f7955633de
Improve window_set_current_screen and fix secondary window initial mode and positions. 2022-12-29 09:43:39 +02:00
Rémi Verschelde
f8f496ec3b
Merge pull request #69678 from Sauermann/fix-slider-button-up
Fix colorpicker slider bug with mouse-up outside of popup
2022-12-16 13:47:53 +01:00
Rémi Verschelde
0a3f66471e
Merge pull request #69712 from bruvzg/real_size
Rename `window_get_real_size`, add position counterpart.
2022-12-07 14:29:46 +01:00
bruvzg
edf13eb5a6
Rename window_get_real_size to window_get_size_with_decorations, add window_get_position_with_decorations. 2022-12-07 11:07:30 +02:00
bruvzg
ad0f6ff85b
[Linux/X11] Split fullscreen mode into WINDOW_MODE_EXCLUSIVE_FULLSCREEN and WINDOW_MODE_FULLSCREEN to improve multi-window handling. 2022-12-07 09:54:02 +02:00
Markus Sauermann
b44e6bb42b Fix colorpicker slider bug with mouse-up outside of popup
When releasing the mouse button outside of the popup while dragging
a slider, the slider still gets adjusted by mouse-move events.

The reason for this bug is that the mouse-up event is sent to the
focused window (main editor window) instead of the colorpicker
popup window.

This PR adjusts the linuxbsd X11 DisplayServer to send the event to the
correct expected window.
2022-12-06 19:30:13 +01:00
Markus Sauermann
ada4761181 Fix that mouse-button-up event is parsed twice for drag-and-drop
Currently Input::get_singleton()->parse_input_event(mb); is
called twice for mouse-button-up events when dropping in a different
window on linuxbsd.
2022-12-05 19:31:22 +01:00
Riteo
2dd5a792bb Load X11 dynamically
The loaders have been generated through hpvb's dynload-wrapper, although
they had to be heavily handpatched to workaround some already reported
issues with it. I added a note to each generated file to account for
that.

As GLAD uses X11 stuff directly, I had to define the GLAD_GLX_NO_X11
macro to not let do it that, and handle myself the display loading and
screen handling part myself, which wasn't that hard but it's still
something worth saying.

I plan to improve greatly the X11 backend (including this aspect) but,
as the release isn't that far and I'm also working on the Wayland
backend, this will do for now, I hope.
2022-12-03 19:23:43 +01:00
clayjohn
58a9cfee80 Set vsync on window creation when using GLES3.
Add vsync to Windows platform
2022-11-15 14:14:21 -08:00
Markus Sauermann
ed5c9a07d7 Fix gl_manager nullptr crash
Add a nullptr-check, before accessing gl_manager
2022-11-13 00:48:45 +01:00
Markus Sauermann
52d75c9b35 Fix unsent WINDOW_EVENT_MOUSE_ENTER event on mouse_mode-change
coauthor: @bruvzg

On linuxbsd and macOS the WINDOW_EVENT_MOUSE_ENTER was not sent,
when the mouse became visible again after a mouse_mode-change.
2022-11-11 07:52:16 +01:00
David Snopek
23603e409c Add support for OpenGL to OpenXR 2022-11-08 18:47:11 -06:00
Rémi Verschelde
879aac9db4
Merge pull request #67695 from Sauermann/fix-filedrop-space
Do not strip spaces at the end of file names of dropped files
2022-11-03 12:08:08 +01:00
Markus Sauermann
5d0aade322 Do not strip spaces at the end of file names of dropped files on linuxbsd 2022-11-03 11:38:42 +01:00
Markus Sauermann
8fb4b5998e Fix unwanted popup closing by mouse-move while holding mouse-button 2022-11-03 11:36:58 +01:00
Riteo
593c571d6a linuxbsd: move all X11 stuff in its own directory
This allows implementing `DisplayServer`s like Wayland without making a
mess in the source tree.
2022-11-02 20:48:46 +01:00
Renamed from platform/linuxbsd/display_server_x11.cpp (Browse further)