mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Restrict relative mouse mode to Wayland users (#15697)
This commit is contained in:
parent
282c81fe3a
commit
45c5ef8798
4 changed files with 25 additions and 2 deletions
|
@ -1248,6 +1248,15 @@ bool CIrrDeviceSDL::supportsTouchEvents() const
|
|||
return true;
|
||||
}
|
||||
|
||||
//! Checks whether windowing uses the Wayland protocol.
|
||||
bool CIrrDeviceSDL::isUsingWayland() const
|
||||
{
|
||||
if (!Window)
|
||||
return false;
|
||||
auto *name = SDL_GetCurrentVideoDriver();
|
||||
return name && !strcmp(name, "wayland");
|
||||
}
|
||||
|
||||
//! returns if window is active. if not, nothing need to be drawn
|
||||
bool CIrrDeviceSDL::isWindowActive() const
|
||||
{
|
||||
|
|
|
@ -96,6 +96,9 @@ public:
|
|||
//! Checks if the Irrlicht device supports touch events.
|
||||
bool supportsTouchEvents() const override;
|
||||
|
||||
//! Checks whether windowing uses the Wayland protocol.
|
||||
bool isUsingWayland() const override;
|
||||
|
||||
//! Get the position of this window on screen
|
||||
core::position2di getWindowPosition() override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue