aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core-utils/lumina-config/globals.h2
-rw-r--r--src-qt5/core-utils/lumina-config/lumina-config.pro1
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_mouse.cpp16
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_mouse.h3
-rw-r--r--src-qt5/core/libLumina/LInputDevice.cpp8
5 files changed, 24 insertions, 6 deletions
diff --git a/src-qt5/core-utils/lumina-config/globals.h b/src-qt5/core-utils/lumina-config/globals.h
index 0f94785c..ed7549aa 100644
--- a/src-qt5/core-utils/lumina-config/globals.h
+++ b/src-qt5/core-utils/lumina-config/globals.h
@@ -35,6 +35,8 @@
#include <LuminaOS.h>
#include <LuminaThemes.h>
+#include "pages/PageWidget.h"
+
#endif
//Now the global class for available system applications
diff --git a/src-qt5/core-utils/lumina-config/lumina-config.pro b/src-qt5/core-utils/lumina-config/lumina-config.pro
index fe5494de..57531e69 100644
--- a/src-qt5/core-utils/lumina-config/lumina-config.pro
+++ b/src-qt5/core-utils/lumina-config/lumina-config.pro
@@ -15,6 +15,7 @@ include(../../core/libLumina/LDesktopUtils.pri) #includes LUtils
include(../../core/libLumina/LuminaXDG.pri)
include(../../core/libLumina/LuminaSingleApplication.pri)
include(../../core/libLumina/LuminaThemes.pri)
+include(../../core/libLumina/LInputDevice.pri)
SOURCES += main.cpp \
mainWindow.cpp \
diff --git a/src-qt5/core-utils/lumina-config/pages/page_mouse.cpp b/src-qt5/core-utils/lumina-config/pages/page_mouse.cpp
index 675a8b25..0dabdf2d 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_mouse.cpp
+++ b/src-qt5/core-utils/lumina-config/pages/page_mouse.cpp
@@ -14,11 +14,23 @@
page_mouse::page_mouse(QWidget *parent) : PageWidget(parent), ui(new Ui::page_mouse()){
ui->setupUi(this);
connect(ui->slider_accel, SIGNAL(valueChanged(int)), this, SLOT(accelChanged(int)) );
- updateIcons();
+ updateIcons();
+ qDebug() << "List Devices:";
+ QList<LInputDevice*> devices = LInput::listDevices();
+ for(int i=0; i<devices.length(); i++){
+ if(!devices[i]->isPointer()){
+ ::free( devices.takeAt(i));
+ i--;
+ }else{
+ qDebug() << "Found Pointer:" << devices[i]->devNumber();
+ qDebug() << " - isExtension:" << devices[i]->isExtension();
+ devices[i]->listProperties();
+ }
+ }
}
page_mouse::~page_mouse(){
-
+ for(int i=0; i<devices.length(); i++){ ::free(devices[i]); }
}
//================
diff --git a/src-qt5/core-utils/lumina-config/pages/page_mouse.h b/src-qt5/core-utils/lumina-config/pages/page_mouse.h
index f005760f..849917c5 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_mouse.h
+++ b/src-qt5/core-utils/lumina-config/pages/page_mouse.h
@@ -9,6 +9,8 @@
#include "../globals.h"
#include "PageWidget.h"
+#include <LInputDevice.h>
+
namespace Ui{
class page_mouse;
};
@@ -26,6 +28,7 @@ public slots:
private:
Ui::page_mouse *ui;
+ QList<LInputDevice*> devices;
private slots:
void accelChanged(int val);
diff --git a/src-qt5/core/libLumina/LInputDevice.cpp b/src-qt5/core/libLumina/LInputDevice.cpp
index a760d19d..79f5c27f 100644
--- a/src-qt5/core/libLumina/LInputDevice.cpp
+++ b/src-qt5/core/libLumina/LInputDevice.cpp
@@ -69,17 +69,17 @@ QList<LInputDevice*> LInput::listDevices(){
xcb_input_list_input_devices_reply_t *reply = xcb_input_list_input_devices_reply(QX11Info::connection(), cookie, NULL);
if(reply==0){ return devices; } //error - nothing returned
//Use the iterator for going through the reply
+ //qDebug() << "Create iterator";
xcb_input_device_info_iterator_t iter = xcb_input_list_input_devices_devices_iterator(reply);
//xcb_str_iterator_t nameiter = xcb_input_list_input_devices_names_iterator(reply);
//Now step through the reply
- QStringList info;
while(iter.data != 0 ){
devices << new LInputDevice(iter.data->device_id, iter.data->device_use);
- //qDebug() << "Input Device:" << iter.data->device_id;
+ //qDebug() << "Found Input Device:" << iter.data->device_id;
//qDebug() << " - num_class_info:" << iter.data->num_class_info;
- xcb_input_device_info_next(&iter);
- //xcb_input_device_name_next(&nameiter);
+ if(iter.rem>0){ xcb_input_device_info_next(&iter); }
+ else{ break; }
}
//Free the reply (done with it)
::free(reply);
bgstack15