wxMenu on touch screens

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
bveb
In need of some credit
In need of some credit
Posts: 2
Joined: Mon Aug 08, 2005 8:14 am

wxMenu on touch screens

Post by bveb » Tue Aug 16, 2005 9:25 am

Hi ppl. I can not solve my problem with wxMenu.. I have a touchpad screen ... Firefox menu selection works. I can select click Firefox's menus.. (I give this exapmle because its GTK.) But problem is I cannot click wxWidgets menus. I can select. Popup appears. I can activate menu items... I cannot click it.. Normal mouse events work as expected.
Any suggestion..

benedicte
wxWorld Domination!
wxWorld Domination!
Posts: 1409
Joined: Wed Jan 19, 2005 3:44 pm
Location: Paris, France

Post by benedicte » Fri Aug 19, 2005 1:10 pm

did you try to double tap on the screen on the menu item ?

it used to work this way on some PDAs/Tablet PCs.

djwdg
In need of some credit
In need of some credit
Posts: 6
Joined: Wed Jul 01, 2020 12:23 am

Re: wxMenu on touch screens

Post by djwdg » Wed Jul 01, 2020 2:07 am

I too am having this problem some 15 years later. This is using personal C++ code with wxWidgets 5.15.0 on a Dell Venue II Pro 7140 with ubuntu 20.04. Touch seems to work for everything that needs a left mouse click EXCEPT menu items, like the originator of this question observed. The touch hilites the menu item but does nothing else. Double-touching doesn't do anything. If a keyboard is attached, hitting ENTER activates the hilited menu item, but a keyboard will ultimately not be available. Touch works for menus of other apps with a single touch. Any new ideas on this? Code looks like:

Code: Select all

wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
. . .
EVT_MENU(ID_TabletViewActions, MyFrame::OnTabletViewEnabled)
. . .
wxMenu *menuActions = new wxMenu;
. . .
mi_tabletViewEnabled = menuActions->Append(ID_TabletViewActions, "Tablet View", wxEmptyString, wxITEM_CHECK );
. . .
void MyFrame::OnTabletViewEnabled(wxCommandEvent& event) {
  // do stuff
}
Thanks

User avatar
doublemax
Moderator
Moderator
Posts: 15065
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxMenu on touch screens

Post by doublemax » Wed Jul 01, 2020 5:12 am

Can you build and run the "minimal" sample that comes with wxWidgets? If it happens there, too, please open a bug report at: http://trac.wxwidgets.org

Please provide the correct wxWidgets version (5.15.0 can't be true as the latest version is 3.1.4), if it was built using GTK2 or GTK3, and the exact GTK version.
Use the source, Luke!

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4360
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxMenu on touch screens

Post by ONEEYEMAN » Wed Jul 01, 2020 4:40 pm

Hi,
Or maybe even try the menu sample?

Thank you.

djwdg
In need of some credit
In need of some credit
Posts: 6
Joined: Wed Jul 01, 2020 12:23 am

Re: wxMenu on touch screens

Post by djwdg » Thu Jul 02, 2020 5:13 am

Thanks for the input, doublemax and oneeyeman. I am having trouble getting to http://trac.wxwidgets.org. Perhaps it's down. In the meantime, I will post my results here and work on submitting a bug report later.

The "minimal" sample had the same problem. The "menu" sample did too. That is, menu pulldowns happened when the pulldown is touched, but touching the menu items only hilited them. Touching the pulldown header did not close the menu list as would have happened with a mouse. Submenus were activated when the respective menu item was touched, but the same problem existed with those sub-menu items.
The various versions:

Code: Select all

$ wx-config --version-full
3.0.4.0
$ dpkg -l libgtk2.0-0 libgtk-3-0
||/ Name              Version          Architecture Description
ii  libgtk-3-0:amd64  3.24.18-1ubuntu1 amd64        GTK graphical user interface library
ii  libgtk2.0-0:amd64 2.24.32-4ubuntu4 amd64        GTK graphical user interface library - old version
$ wx-config --selected-config
gtk3-unicode-3.0
$
I loaded wxWidgets from a pre-compiled package provided by ubuntu. I got the samples from a pre-configured package provided by ubuntu. These had a Makefile in each of the respective dirs (minimal and menu), which I used to build the executable for those two samples

Code: Select all

sudo apt install libwxgtk3.0-gtk3-0v5
sudo apt install libwxgtk3.0-gtk3-dev
sudo apt install wx3.0-examples
As for the "menu" sample, there was some errata printed to the window which may be useful.

Code: Select all

--touched the File menu header--
A menu has been highlighted (id=-2001).
A menu has been opened.
-- touched Show Dialog, turning the background gray --
A menu has been closed.
A popup menu has been highlighted (id=-1).
A menu has been highlighted (id=101)
-- touching Show Dialog again did nothing --
-- touched Exit, turning its background gray and Dialog's white --
A popup menu has been highlighted (id=-1).
A menu has been highlighted (id=5006).
I can do more such testing if it helps. Thanks again.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4360
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxMenu on touch screens

Post by ONEEYEMAN » Thu Jul 02, 2020 2:34 pm

Hi,
Could you please try to reproduce it in the latest master?

You need to install git for that.

And you will need it to submit a bug report to confirm it's still a problem.

Thank you.

BTW, do you use Unity with ubuntu?

djwdg
In need of some credit
In need of some credit
Posts: 6
Joined: Wed Jul 01, 2020 12:23 am

Re: wxMenu on touch screens

Post by djwdg » Fri Jul 03, 2020 9:47 pm

I git-pulled the latest master and still see the same problem with "minimal" and "menu" samples. I created a ticket #18807 to that end. Thanks for your help. No, I don't use unity, just the default which I guess is gnome. I might try it now. I'm relatively new to ubuntu, been mostly working on redhat/centos. In this case, ubuntu was the only linux distro that worked both the Venue's wireless and sound out of the box, and I'm sold now.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4360
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxMenu on touch screens

Post by ONEEYEMAN » Fri Jul 03, 2020 11:24 pm

Hi,
One more question - what is an exact GTK+ version wxWidgets is compiled against?

You can find that out by connecting the mouse, start the sample and do "Ctrl+Alt+Middle_Click".

Thank you.

djwdg
In need of some credit
In need of some credit
Posts: 6
Joined: Wed Jul 01, 2020 12:23 am

Re: wxMenu on touch screens

Post by djwdg » Sat Jul 11, 2020 5:00 am

sorry, oneeyeman, I wasn't watching this anymore until just now. The gtk version is 3.24.14. Since the last post, the issue progressed to the point where they believe it's a gtk problem, since it also fails a gtk sample the same way. I also stumbled upon a gtk issue that's been open for a few years that appears to be related and just now looks resolved: https://gitlab.gnome.org/GNOME/gtk/-/issues/945. Thanks for your help.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4360
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxMenu on touch screens

Post by ONEEYEMAN » Sat Jul 11, 2020 5:51 am

Hi,
So does this mean that if you recompile GTK+, wxWidgets and your application everything will work?

Good.

Just mark this as solved then.

Thank you.

djwdg
In need of some credit
In need of some credit
Posts: 6
Joined: Wed Jul 01, 2020 12:23 am

Re: wxMenu on touch screens

Post by djwdg » Mon Jul 13, 2020 12:16 am

I'm not sure whether this is a gtk fix or an X11 fix … I need to dig deeper. But wxWidgets is definitely not the issue, so will mark this as solved.

djwdg
In need of some credit
In need of some credit
Posts: 6
Joined: Wed Jul 01, 2020 12:23 am

Re: wxMenu on touch screens

Post by djwdg » Mon Jul 13, 2020 12:21 am

Well, maybe not. I don't see a way to mark it as solved. Maybe I'm not authorized to do so.

Post Reply