User avatar
PeterO
Posts: 4257
Joined: Sun Jul 22, 2012 4:14 pm

GTK3 Comboboxes unusable on touch display

Thu Sep 20, 2018 10:26 am

I've discovered that the combobox in GTK3 is unusable on a touch screen like the official 7" display.

First found the problem in my own code then found the combobox demo code in gtk3-demo has the same problems.

gtk3-demo comes from the gtk-3-examples package and can can be install with

Code: Select all

sudo apt-get install gtk-3-examples
I can't find anything other than vague mentions of this problem and no suggestions for solutions.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),Aeromodelling,1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20674
Joined: Sat Jul 30, 2011 7:41 pm

Re: GTK3 Comboboxes unusable on touch display

Thu Sep 20, 2018 10:43 am

What are the symptoms?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

User avatar
PeterO
Posts: 4257
Joined: Sun Jul 22, 2012 4:14 pm

Re: GTK3 Comboboxes unusable on touch display

Thu Sep 20, 2018 11:53 am

Combobox is unusable.

Install the demo and try it yourself.

The "Items with icons" example won't allow the selection to be changed from "Warning"
With a mouse the selection highlighting follows the mouse pointer, but with the touch screen the selection won't change.

And it is inconsistent too. Once in a while it seems to work for one change, then it stops working again.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),Aeromodelling,1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
PeterO
Posts: 4257
Joined: Sun Jul 22, 2012 4:14 pm

Re: GTK3 Comboboxes unusable on touch display

Fri Sep 21, 2018 1:04 pm

Worked around problem using a GtkMenuButton and a GtkPopover, which works nicely :-)
Image
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),Aeromodelling,1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
Paeryn
Posts: 2168
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: GTK3 Comboboxes unusable on touch display

Fri Sep 21, 2018 8:18 pm

It could be that GTK+3's combo-box suffers from being too sensitive, clicking it brings the selections up and requires a second click to choose an option. However if the pointer moves so much as 1 pixel (I think, definitely very little movement) whilst that first click happens then it automatically selects whatever is under the pointer on release. With a touchscreen there is a big chance that a small movement is registered between touching and releasing. You might not notice that the list was opened if it hasn't had time to update the display before the selection happens.
She who travels light — forgot something.

Return to “Official Foundation Display”