fix: if XInputExtension isn't present, hasTouchpadOnX11() should return false
hasTouchpadOnX11() return false when cann't find TouchPad from XInput so if XInputExtension isn't present, hasTouchpadOnX11() should return false not true
This commit is contained in:
parent
1c733f69b6
commit
d98c1e513a
|
@ -25,8 +25,8 @@ bool TouchpadDeviceHelper::hasTouchpadOnX11()
|
|||
int devicesNum;
|
||||
bool result;
|
||||
|
||||
if (supportsXinputDevices() == false) {
|
||||
return true;
|
||||
if (!supportXinputExtension()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
deviceInfo = XListInputDevices(QX11Info::display(), &devicesNum);
|
||||
|
@ -51,7 +51,7 @@ bool TouchpadDeviceHelper::hasTouchpadOnX11()
|
|||
return result;
|
||||
}
|
||||
|
||||
bool TouchpadDeviceHelper::supportsXinputDevices()
|
||||
bool TouchpadDeviceHelper::supportXinputExtension()
|
||||
{
|
||||
int op_code, event, error;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ private:
|
|||
|
||||
static bool hasTouchpadOnX11();
|
||||
static XDevice* deviceIsTouchpad(XDeviceInfo* deviceinfo);
|
||||
static bool supportsXinputDevices();
|
||||
static bool supportXinputExtension();
|
||||
static bool deviceHasProperty(XDevice *device, const char *property_name);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue