Check hardware keyboard availability on wayland for better touch screen support
This commit is contained in:
parent
a0e182b142
commit
4bd94f8ea6
@ -538,6 +538,7 @@ public:
|
||||
|
||||
if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !device->m_keyboard)
|
||||
{
|
||||
device->m_has_hardware_keyboard = true;
|
||||
device->m_keyboard = wl_seat_get_keyboard(seat);
|
||||
wl_keyboard_add_listener(device->m_keyboard, &keyboard_listener,
|
||||
device);
|
||||
@ -870,6 +871,7 @@ CIrrDeviceWayland::CIrrDeviceWayland(const SIrrlichtCreationParameters& params)
|
||||
m_height = params.WindowSize.Height;
|
||||
m_touches_count = 0;
|
||||
m_has_touch_device = false;
|
||||
m_has_hardware_keyboard = false;
|
||||
m_window_has_focus = false;
|
||||
m_window_minimized = false;
|
||||
|
||||
|
@ -118,6 +118,9 @@ namespace irr
|
||||
|
||||
//! Returns true if system has touch device
|
||||
virtual bool supportsTouchDevice() const { return m_has_touch_device; }
|
||||
|
||||
//! Returns true if system has hardware keyboard
|
||||
virtual bool hasHardwareKeyboard() const { return m_has_hardware_keyboard; }
|
||||
|
||||
//! Set the current Gamma Value for the Display
|
||||
virtual bool setGammaRamp(f32 red, f32 green, f32 blue,
|
||||
@ -220,6 +223,7 @@ namespace irr
|
||||
unsigned int m_height;
|
||||
unsigned int m_touches_count;
|
||||
bool m_has_touch_device;
|
||||
bool m_has_hardware_keyboard;
|
||||
bool m_window_has_focus;
|
||||
bool m_window_minimized;
|
||||
mutable core::stringc m_clipboard;
|
||||
|
@ -532,7 +532,7 @@ namespace UserConfigParams
|
||||
"multitouch interface."));
|
||||
|
||||
PARAM_PREFIX IntUserConfigParam m_screen_keyboard
|
||||
PARAM_DEFAULT( IntUserConfigParam(0, "screen_keyboard_mode",
|
||||
PARAM_DEFAULT( IntUserConfigParam(1, "screen_keyboard_mode",
|
||||
&m_multitouch_group,
|
||||
"Screen keyboard mode: 0 = disabled, 1 = enabled if no hardware "
|
||||
"keyboard, 2 = always enabled") );
|
||||
|
Loading…
Reference in New Issue
Block a user