Re: Disable system click for an application?
On 03/23/11 23:27, ext Tarantism wrote: On Wed, 2011-03-23 at 10:31 +0200, Kimmo Hämäläinen wrote: On 03/23/11 00:30, ext Tarantism wrote: I'd like to disable the system touch screen click for my application. The best way depends on your application. Do you use GTK/Qt/pure-X or what? I'm using Qt. In GTK, you could create a widget and call gtk_grab_add() for it to catch all mouse events (including taps on the screen). Following your suggestion, I've tried calling the event accept method in the relevant mousePressEvent handler and also in the MainWindow widget handler but I still get clicks. Any clues? Implement QApplication::x11EventFilter(): http://doc.qt.nokia.com/4.6/qapplication.html#x11EventFilter and return true for ButtonPress/ButtonRelease/MotionNotify. x11EventFilter is called before Qt's own handling of the event, and returning true for an event skips Qt's own handling for it. -Kimmo ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Disable system click for an application?
On 03/23/11 00:30, ext Tarantism wrote: I'd like to disable the system touch screen click for my application. Can this be done? The best way depends on your application. Do you use GTK/Qt/pure-X or what? In GTK, you could create a widget and call gtk_grab_add() for it to catch all mouse events (including taps on the screen). -Kimmo Thanks. ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Disable system click for an application?
On Wed, 2011-03-23 at 10:31 +0200, Kimmo Hämäläinen wrote: On 03/23/11 00:30, ext Tarantism wrote: I'd like to disable the system touch screen click for my application. The best way depends on your application. Do you use GTK/Qt/pure-X or what? I'm using Qt. In GTK, you could create a widget and call gtk_grab_add() for it to catch all mouse events (including taps on the screen). Following your suggestion, I've tried calling the event accept method in the relevant mousePressEvent handler and also in the MainWindow widget handler but I still get clicks. Any clues? ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
RE: Disable system click for an application?
Typically installing a event filter should be enough for most cases. If not, you can create a class derived from QApplication and override the notify method (http://doc.qt.nokia.com/latest/qcoreapplication.html#notify). It will allow you to filter all the events before they can make to any object. Felipe -Original Message- From: maemo-developers-boun...@maemo.org [mailto:maemo-developers-boun...@maemo.org] On Behalf Of Tarantism Sent: Wednesday, March 23, 2011 5:28 PM To: maemo-developers@maemo.org Subject: Re: Disable system click for an application? On Wed, 2011-03-23 at 10:31 +0200, Kimmo Hämäläinen wrote: On 03/23/11 00:30, ext Tarantism wrote: I'd like to disable the system touch screen click for my application. The best way depends on your application. Do you use GTK/Qt/pure-X or what? I'm using Qt. In GTK, you could create a widget and call gtk_grab_add() for it to catch all mouse events (including taps on the screen). Following your suggestion, I've tried calling the event accept method in the relevant mousePressEvent handler and also in the MainWindow widget handler but I still get clicks. Any clues? ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Disable system click for an application?
I'd like to disable the system touch screen click for my application. Can this be done? Thanks. ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers