|
20a76b0e
|
2022-07-25T23:06:58
|
|
video: removed unused devindex argument from bootstrap's create method.
|
|
e427e80b
|
2022-06-14T10:41:18
|
|
wayland: Use the output descriptions from xdg-output when available
Some compositors will provide 'nicer' / 'human readable' output descriptions via the xdg-output protocol. Use these description strings, when available, instead of the model name provided by wl-output. On compositors such as GNOME where this is provided, the display names provided to applications by SDL will now match those in the desktop display settings panel. On compositors where this data isn't provided, the old behavior of using the model string provided by wl-output will remain unchanged.
Additionally, per the protocol spec, output data provided by xdg-output should supersede wl-output data, so this is the recommended behavior in general.
|
|
a20516d4
|
2022-05-16T10:35:56
|
|
wayland: Swap emulated mode dimensions in more cases
Some compositors (GNOME for example) don't set the transform flag when dealing with portrait mode displays, so the video modes won't have the width/height swapped in all cases where they should be. Check for both the 90/270 degree transform flag and if the display is taller than it is wide when determining whether to swap the width and height of the emulated video modes, and adjust the comparison logic when size testing against the native mode to account for this.
|
|
e1c83504
|
2022-05-15T10:35:59
|
|
wayland: Add a hint to disable video mode emulation under Wayland
Add the hint "SDL_VIDEO_WAYLAND_MODE_EMULATION", which can be used to disable mode emulation under Wayland. When disabled, only the desktop and/or native display resolution is exposed.
|
|
e9d3dcea
|
2022-05-14T18:32:05
|
|
wayland: Unify integer and fractional output scaling
Previously, scale values used by the displays and surfaces were always integers, with fractional scale values only being calculated when the backbuffer and viewport sizes were being determined. Now, if xdg-output is available, the fractional scale of output displays is calculated when the displays are enumerated and the true scale values of the output devices are used whenever possible.
This unifies the integer and fractional scaling systems, allows for the use of more accurate scale values that minimize overdraw when windows straddle multiple outputs, and lays the groundwork for the pending Wayland scaling protocols that will report the preferred scale values per-surface instead of per-output.
|
|
6222bd31
|
2022-05-11T16:26:43
|
|
wayland: Don't create a new libdecor context if one already exists
|
|
6f88cbe4
|
2022-05-11T16:04:34
|
|
wayland: Support xdg_decoration requesting client-side decorations.
Don't be fooled by the diff size - this ended up being a big refactor of the
shell surface management, masked only by some helper macros I wrote for the
popup support.
This change makes it so when xdg_decoration is supported, but CSD is requested,
the system bails on xdg support entirely and resets all the windows to use
libdecor instead. This transition isn't pretty, but once it's done it will be
smooth if decorations are an OS toggle since libdecor will take things from
there.
In hindsight, we really should have designed libdecor to be passed a toplevel,
having it manage that for us keeps causing major refactors for _every_ change.
|
|
c37090f9
|
2022-04-18T12:30:08
|
|
wayland: Add support for TOOLTIP/POPUP_MENU
|
|
9c2f46b0
|
2022-04-12T15:23:22
|
|
Wayland: Add SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR
This hint allows libdecor to be used even when xdg-decoration is
available. It's mostly useful for debugging libdecor, but could in
theory be used by applications which want to (for example) bundle their
own libdecor plugins.
|
|
fa4c5198
|
2022-03-28T21:32:30
|
|
video: wayland: Expose more resolutions for mode emulation
Expose as many emulated display modes as possible. They will currently display stretched to the display's native desktop aspect, but if an application requires a hardcoded resolution, it will work at minimum.
Aside from the change in the emulated display mode list, the Wayland event handling code had to be updated to support separate scaling for the x and y axes, as square pixels are no longer guaranteed.
|
|
d875416a
|
2022-03-28T15:32:30
|
|
wayland: Minor fix for old compilers
|
|
4d76c9cb
|
2022-03-25T20:35:07
|
|
video: wayland: Use wp-viewporter for fullscreen with non-native resolutions
Wayland doesn't support mode switching, however Wayland compositors can support the wp_viewporter protocol, which allows for the mapping of arbitrarily sized buffer regions to output surfaces. Use this functionality, when available, for fullscreen output when using non-native display modes and/or when dealing with scaled desktops, which can incur significant overdraw without this extension.
This also allows for the exposure of arbitrarily sized, emulated display modes, which can be useful for legacy compatability.
|
|
713a6754
|
2022-03-26T22:26:15
|
|
wayland: Relax the check for mismatching output scales
|
|
5655be15
|
2022-03-26T19:57:39
|
|
wayland: Avoid overwriting xdg_output position with wl_output position
|
|
40417b18
|
2022-03-26T19:55:04
|
|
wayland: Work around a GNOME xdg_output scaling issue
|
|
ab74b6a3
|
2022-03-24T15:34:29
|
|
wayland: Remove some now-redundant casts
|
|
ee52ad08
|
2022-03-24T15:32:25
|
|
wayland: Minor fixes for old compilers
|
|
0dae35bf
|
2022-03-19T15:58:47
|
|
video: wayland: Use xdg-output for retrieving the desktop dimensions
Using wl-output to get the desktop display dimensions and dividing by the integer scale factor will not return the correct result when using a desktop with fractional scaling (e.g. a 3840x2160 display at 150% will incorrectly report the scaled desktop area as 1920x1080 instead of 2560x1440). Use the xdg-output protocol, if available, to retrieve the correct desktop dimensions and offset.
Versions 1 through 3 of the protocol are supported.
|
|
9125b244
|
2022-03-23T13:46:25
|
|
wayland: Basic support for zwp_tablet_*v2 protocol
|
|
13337e17
|
2022-03-23T13:27:01
|
|
wayland: The rest of the wayland-client 1.18 requirement... Git, please
|
|
cc40f732
|
2022-01-26T21:09:39
|
|
wayland: Round the refresh rate rather than truncating it
A 59999 mHz monitor should be reported as 60 Hz, not 59 Hz.
|
|
ed3442d7
|
2022-01-19T15:47:52
|
|
wayland: Fix building with SDL_OPENGL=OFF
|
|
120c76c8
|
2022-01-03T09:40:00
|
|
Updated copyright for 2022
|
|
72e53e4b
|
2021-11-28T19:25:22
|
|
wayland: Clear driverdata before calling ResetDisplayModes
|
|
57366285
|
2021-11-23T20:14:18
|
|
Only send display events for hotplugged displays, not the initial state
|
|
d31251b0
|
2021-11-21T22:30:48
|
|
use SDL's functions version inplace of libc version
|
|
a7a54e64
|
2021-11-18T00:43:55
|
|
wayland: Add support for display connect/disconnect events
|
|
5cc23868
|
2021-11-15T11:52:43
|
|
wayland: Add support for SDL_DisplayOrientation
|
|
ae67c7d2
|
2021-11-09T01:30:00
|
|
Implemented SDL_SetWindowMouseRect() on Wayland
|
|
2bf36bfa
|
2021-10-24T21:28:04
|
|
wayland: Implement WaitEventTimeout() and SendWakeupEvent()
We can have spurious wakeups in WaitEventTimeout() due to Wayland events
that don't end up causing us to generate an SDL event. Fortunately for us,
SDL_WaitEventTimeout_Device() handles this situation properly by calling
WaitEventTimeout() again with an adjusted timeout.
|
|
408a93a1
|
2021-10-23T15:43:04
|
|
wayland: Use multi-thread event reading APIs
Wayland provides the prepare_read()/read_events() family of APIs for
reading from the display fd in a deadlock-free manner across multiple
threads in a multi-threaded application. Let's use those instead of
trying to roll our own solution using a mutex.
This fixes an issue where a call to SDL_GL_SwapWindow() doesn't swap
buffers if it happens to collide with SDL_PumpEvents() in the main
thread. It also allows coexistence with other code or toolkits in
our process that may want read and dispatch events themselves.
|
|
25f9e32b
|
2021-10-02T16:52:43
|
|
wayland: Don't let multiple threads dispatch wayland events at once
wl_display_dispatch() will block if there are no events available, and
while we try to avoid this by using SDL_IOReady() to verify there are
events before calling it, there is a race condition between
SDL_IOReady() and wl_display_dispatch() if multiple threads are
involved.
This is made more likely by the fact that SDL_GL_SwapWindow() calls
wl_display_dispatch() if vsync is enabled, in order to wait for frame
events. Therefore any program which pumps events on a different thread
from SDL_GL_SwapWindow() could end up blocking in one or other of them
until another event arrives.
This change fixes this by wrapping wl_display_dispatch() in a new mutex,
which ensures only one thread can compete for wayland events at a time,
and hence the SDL_IOReady() check should successfully prevent either
from blocking.
|
|
8e54698a
|
2021-09-22T13:26:44
|
|
wayland: Add support for high-DPI cursors
|
|
68ca35c3
|
2021-08-11T21:40:46
|
|
wayland: fix memleak in output listener
|
|
2e6dac87
|
2021-08-09T01:47:42
|
|
wayland: Add a hint to allow disabling libdecor use
Useful for testing xdg-shell path with compositors like Weston.
|
|
b08b1bde
|
2021-08-03T22:50:58
|
|
linux: remove d-bus lazy init dead code
Lazy init in X11/Wayland is dead code since dbdbae4
|
|
32f909f7
|
2021-08-03T13:30:57
|
|
wayland: Remove redundant waylanddyn.h includes.
All files including waylanddyn.h already include waylandvideo.h first.
|
|
e5594e66
|
2021-07-30T16:03:01
|
|
wayland: Prefer our SSD implementation if available
|
|
74162b74
|
2021-07-29T13:27:31
|
|
wayland: Add support for text-input-unstable-v3
|
|
03185e74
|
2021-07-27T18:35:00
|
|
wayland: Tag/Check wl_output objects as well, fixes crashes when libdecor is in use
|
|
6aae5b44
|
2021-07-27T17:12:26
|
|
Remove wl-shell and xdg-shell-unstable-v6 support (#4323)
* wayland-protocol: update wayland.xml to 1.19.0
* wayland: remove shell_surface field from SDL_SysWMinfo
* wayland: remove wl_shell support
* waypand-protocols: update xdg-shell.xml to 1.20
* wayland: remove xdg-shell-unstable-v6 support
* wayland: deprecate wl shell surface syswm info, add xdg surface
|
|
9e6fcbe7
|
2020-06-11T22:10:28
|
|
wayland: client-side decoration
|
|
4ada14a2
|
2021-07-21T13:39:10
|
|
Replace libc functions to SDL equivalent in wayland video subsystem
Wayland video subsystem uses a mix of libc and SDL function.
This patch switches libc functions to SDL ones and fixes a mismatch in memory
allocation/dealoccation of SDL_Cursor in SDL_waylandmouse.c (calloc on line 201
and SDL_free on line 313) which caused memory corruption if custom memory
allocator where provided to SDL.
|
|
d956636c
|
2021-06-04T18:39:47
|
|
wayland: Implement FlashWindow
|
|
151f9538
|
2021-06-02T11:41:44
|
|
wayland: Implement RaiseWindow with xdg-activation
|
|
8e3ec34d
|
2021-04-20T12:40:40
|
|
wayland: Refactor toplevel mapping, implement HideWindow
|
|
509228c4
|
2021-04-18T22:26:27
|
|
wayland: Implement GetDisplayDPI
|
|
fcbfe33c
|
2021-04-18T09:45:22
|
|
wayland: Implement SetWindowModalFor
|
|
0f518002
|
2021-04-18T09:33:57
|
|
wayland: Removed unused GetDisplayModes/SetDisplayMode functions
|
|
46df195b
|
2021-04-18T09:33:06
|
|
wayland: Implement GetDisplayBounds
|
|
ed24c345
|
2021-04-16T21:35:50
|
|
wayland: Implement basic window move events via wl_surface_listener.
This unearthed an unspeakably large amount of bugs in the wl_output enumerator,
notably the fact that the wl_output user pointer was to temporary memory!
This was "fixed" in e862856, and was then pointed out as a leak in 4183211,
which was undone in d9ba204. The busted fix was correct that the malloc was an
issue, but wrong about _why_; SDL_AddVideoDisplay copies by value and does not
reuse the pointer, so generally you want your VideoDisplay to be on the stack,
but of course the callbacks don't allow that, so a malloc was a workaround. But
we can do better and just host our temporary display inside WaylandOutputData
because that will be persistent while also not leaking.
Wait, wasn't I talking about move events? Right, that: wl_surface_listener does
at least give us the ability to know what monitor we're on, even though we have
no idea where we are on the monitor. All we need to do is check the wl_output
against the display list and then push a move event that both indicates the
correct display while also not being _too_ much of a lie (but enough of a lie
to where our event doesn't get discarded as "undefined" or whatever). The index
check for the video display is what spawned the great nightmare you see before
you; aside from the bugfix this is actually a really basic patch.
|
|
f88d91d5
|
2021-04-12T23:47:23
|
|
wayland: Minor whitespace fix
|
|
d785dab5
|
2021-04-12T23:37:53
|
|
wayland: Add unscaled resolutions to the display mode list
|
|
7510245a
|
2021-04-08T14:08:35
|
|
wayland: Create the data_device only after both device_manager and input exist.
There is no guarantee on what order the Wayland interfaces will come in, but the
callbacks were assuming that wl_data_device_manager would could before wl_seat.
This would cause certain desktops to not have any data_device to work with,
meaning certain features like the clipboard would silently no-op.
|
|
6fd37194
|
2021-04-07T16:03:41
|
|
wayland: Fix leaked zxdg_decoration_manager
|
|
f6a09ef1
|
2021-04-07T16:16:23
|
|
wayland: Drop support for kwin specific decoration management
KWin has supported the shared and formalised zxdg_decoration since
Plasma 5.16 which came out mid 2019.
Whilst it made sense to support them both for a while, it should not be
needed for future SDL releases.
|
|
dbdbae44
|
2021-04-02T14:35:11
|
|
linux: (de)initialize d-bus at init and quit.
Previously we had different subsystems quitting it, in conflict, and risked
multiple threads racing to init it at the same time.
Fixes #3643.
|
|
eeee7308
|
2021-03-29T16:57:03
|
|
wayland: Implement IME support.
Note that this is purely to make it possible to enter text that requires
composition - for example, before this commit Kanji input didn't work at all.
The big problem this still has is that we need the window position, and this is
still not implemented. Once we have this information we can do the equivalent
of XTranslateCoordinates to put the rectangle where we want it.
|
|
57a927e8
|
2021-02-12T14:27:58
|
|
wayland: Explicitly set min/max size for xdg-shell
|
|
d9ba2044
|
2021-02-08T16:55:01
|
|
Backed out changeset 852a7bdbdf4b
This causes a use-after-free memory error
|
|
4183211a
|
2021-02-08T16:01:37
|
|
free the 'display' after it was added to global list
|
|
ff297753
|
2021-02-04T10:46:34
|
|
Fixed compiler warning
|
|
e862856e
|
2021-02-01T08:57:39
|
|
wayland: Don't crash when the properties of already existing wl_output change
|
|
a4467846
|
2021-01-31T19:09:44
|
|
free the 'data_device_manager'
|
|
3ae2ec34
|
2021-01-31T19:06:37
|
|
wayland: Fix transform and scale handling when setting display mode
|
|
a0d3c6c6
|
2021-01-25T21:42:14
|
|
Rename SetWindowGrab() to SetWindowMouseGrab()
|
|
e1f73e64
|
2021-01-23T16:22:44
|
|
Refactor keyboard grab to be managed by the video core
This gives us flexibility to add others hints to control keyboard grab behavior
without having to touch all of the backends. It also allows us to possibly
expose keyboard grab separately from mouse grab for applications that want to
manage those independently.
|
|
e787282b
|
2021-01-23T15:40:22
|
|
Implement Wayland_SetWindowResizable
|
|
bd553ea8
|
2021-01-20T21:17:20
|
|
Implement support for inhibiting the screensaver on Wayland
We support both the org.freedesktop.ScreenSaver D-Bus API (same as the X11
backend) and the Wayland idle_inhibit_unstable_v1 protocol.
Some Wayland compositors only support one or the other, so we need both to
for broad compatibility.
|
|
19236b46
|
2021-01-21T21:49:13
|
|
Implement support for minimizing windows on Wayland
This required a bit of extra code to deal with the transition from minimized
back to fullscreen
|
|
d789ba83
|
2021-01-19T18:20:07
|
|
Implement keyboard grab support for Wayland
Use zwp_keyboard_shortcuts_inhibit_manager_v1 to allow SDL applications
to capture system keyboard shortcuts like Alt+Tab when keyboard grab is
enabled via SDL_HINT_GRAB_KEYBOARD.
|
|
9130f7c3
|
2021-01-02T10:25:38
|
|
Updated copyright for 2021
|
|
76980e30
|
2020-10-08T16:42:20
|
|
Added events for dynamically connecting and disconnecting displays, with an iOS implementation
|
|
a78b9763
|
2020-07-14T19:18:16
|
|
Reuse Wayland connection from availability check
|
|
052a1373
|
2020-07-12T19:11:15
|
|
Merge VideoBootStrap::available into VideoBootStrap::create
The two are only ever called together, and combining them makes it possible
to eliminate redundant symbol loading and redundant attempts to connect
to a display server.
|
|
1a291ab1
|
2020-04-17T13:55:44
|
|
wayland: add support for SDL_SetWindowGrab
|
|
02469877
|
2020-04-07T13:30:46
|
|
wayland: Support wayland compositors with wl_seat version < 5 (thanks, Nia!).
Fixes Bugzilla #5074.
|
|
a8780c6a
|
2020-01-16T20:49:25
|
|
Updated copyright date for 2020
|
|
cdbeae52
|
2019-12-29T23:10:39
|
|
wayland: support wl_data_device_manager version < 3
|
|
afdb40af
|
2019-08-05T23:38:48
|
|
Fixed bug 4689 - SDL fails to detect compositor shutdown on Wayland -- program keeps running
M Stoeckl
To reproduce:
1. Run any SDL-based program with a Wayland compositor, orphaning it so that it doesn't have an immediate parent process. (For example, from a terminal, running `supertux2 & disown`.) The program should use the wayland backend, i.e. by setting environment variable SDL_VIDEODRIVER=wayland.
2. Kill the compositor process.
Results:
- The SDL program will keep running.
Expected results:
- The SDL program should close. (What close should mean here, I'm not sure - is injecting an SDL_Quit the appropriate action when a video driver disconnects?)
Build data:
2019-06-22, hg tip (12901:bf8d9d29cbf1), Linux, can reproduce with sway, weston, and other Wayland oompositors.
|
|
797b2813
|
2019-06-12T00:55:05
|
|
wayland: HiDPI support
|
|
cddb285c
|
2019-03-12T20:04:08
|
|
Fixed bug 4513 - Wayland, fix crash when remove event is sent (from Sebastian Krzyszkowiak)
|
|
5e13087b
|
2019-01-04T22:01:14
|
|
Updated copyright for 2019
|
|
5f980514
|
2018-11-04T21:08:40
|
|
wayland: ask xdg-decoration protocol extension to use server-side decorations if possible.
|
|
62494a2e
|
2018-10-31T15:03:41
|
|
Merge SDL-ryan-batching-renderer branch to default.
|
|
a5ebd4d7
|
2018-10-29T10:14:59
|
|
wayland: ask KDE protocol extension to use server-side decorations if possible.
|
|
5febdfce
|
2018-09-24T11:49:25
|
|
Fixed whitespace
|
|
c8ac9096
|
2018-06-24T22:42:36
|
|
wayland: Implemented xdg-wm-base support.
This is just in parity with the existing zxdg-shell-unstable-v6 code. Making
the Wayland target robust (and uh, with title bars) is going to take a lot
of work on top of this.
|
|
cd532207
|
2018-02-07T13:13:55
|
|
wayland: Add support for xdg-shell protocol (unstable v6).
This is meant to be the desktop-enhanced version of wl_shell. Right now we
just match what the existing wl_shell code does, but there are other areas of
functionality available to us now, that we can fill in later.
This uses the "unstable" API, since this is what ships in Ubuntu 17.10 (as
part of Wayland 1.10), but Wayland 1.12 promotes this to stable with extremely
minor changes. We will add support for the stable version when it makes sense
to do so.
|
|
8111a632
|
2018-01-03T10:49:26
|
|
Fixed bug 4013 - Wayland: fix videoquit on multimonitor system
Vladimir
On multimonitor system Wayland_VideoQuit invalid deiniting.
Tested in Centos7 + Weston
|
|
e3cc5b2c
|
2018-01-03T10:03:25
|
|
Updated copyright for 2018
|
|
e27f12e0
|
2017-09-29T10:07:37
|
|
wayland: Fix bug 3814 -Wmissing-field-initializers
|
|
50efbda7
|
2017-08-28T00:43:14
|
|
Fixed mingw Windows build, since SDL_vulkan_internal.h includes windows.h
|
|
ce2b1644
|
2017-08-28T00:11:38
|
|
Be clear that disabling Vulkan surface support disables the entire SDL Vulkan integration
|
|
25e3a1ec
|
2017-08-27T22:15:57
|
|
vulkan: Initial Vulkan support!
This work was done by Jacob Lifshay and Mark Callow; I'm just merging it
into revision control.
|
|
6c0aea42
|
2017-05-25T23:00:58
|
|
wayland: Fixed freeing memory of SDL_malloc() with plain free().
|
|
d3591800
|
2017-01-03T00:44:05
|
|
Fixed bug 3519 - SDL_GetDisplayMode fails to report mode.format when using Wayland backend
Ryan C. Gordon
Kristian says you can't do it with Wayland, and that going forward, it'll just handle whatever you throw at it anyhow.
https://twitter.com/hoegsberg/status/816148272402165761
So I say we mark it SDL_PIXELFORMAT_RGB888, which is what my X11 display currently reports, and leave it at that.
|
|
45b774e3
|
2017-01-01T18:33:28
|
|
Updated copyright for 2017
|
|
6fe15d63
|
2016-11-16T22:09:40
|
|
Wayland: Fixed memory leak if output retrieval failed.
Found by Cppcheck.
|
|
d767a450
|
2016-11-06T08:34:27
|
|
Fixed 2942 - Wayland: Drag and Drop / Clipboard
x414e54
I have implemented Drag and Drop and Clipboard support for Wayland.
Drag and dropping files from nautilus to the testdropfile application seems to work and also copy and paste.
|