wxMenu on touch screens
wxMenu on touch screens
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..
Any suggestion..
Re: wxMenu on touch screens
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:
Thanks
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
}
Re: wxMenu on touch screens
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.
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!
Re: wxMenu on touch screens
Hi,
Or maybe even try the menu sample?
Thank you.
Or maybe even try the menu sample?
Thank you.
Re: wxMenu on touch screens
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:
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
As for the "menu" sample, there was some errata printed to the window which may be useful.
I can do more such testing if it helps. Thanks again.
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
$
Code: Select all
sudo apt install libwxgtk3.0-gtk3-0v5
sudo apt install libwxgtk3.0-gtk3-dev
sudo apt install wx3.0-examples
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).
Re: wxMenu on touch screens
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?
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?
Re: wxMenu on touch screens
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.
Re: wxMenu on touch screens
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.
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.
Re: wxMenu on touch screens
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.
Re: wxMenu on touch screens
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.
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.
Re: wxMenu on touch screens
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.
Re: wxMenu on touch screens
Well, maybe not. I don't see a way to mark it as solved. Maybe I'm not authorized to do so.