Option to keep center button always visible as a way to activate Fly Pie. #151
Replies: 10 comments 3 replies
-
This is definitely something worth a discussion as Fly-Pie looks like being made for touch devices but having no obvious way to summon a menu without a keyboard is problematic. The idea of a "Floating Button" came up in several comments around the internet but personally I am a bit hesitant as I see some problems:
If you use touch input, an alternative solution would be to assign a Fly-Pie menu to a specific multitouch gesture. I haven't tried this yet (I have no touch device). There are multiple approaches here (also depending on whether you are using X11 or Wayland), but for example Fusuma looks promising. Also, for Fly-Pie 9 I'll investigate whether it could be possible to summon a menu by pressing a mouse button only. This could be an alternative if you use a stylus for input. What do you think? |
Beta Was this translation helpful? Give feedback.
-
I believe it should show up from the button position, you could have the button push away from the edge to include all items so it doesn't require too much hand travel. I made a rough demonstration of the feature, Click activates the menu, hold moves the menu and click again on the centre closes the menu. Click.and.drag.mp4 |
Beta Was this translation helpful? Give feedback.
-
Nice mockup video 😄 I'll think a about this. It seems to be a great way to make Fly-Pie usable on keyboard-less PCs. However, this could also be useful beyond Fly-Pie. We could consider creating a separate extension for placing such buttons on the screen. They could simply execute any shell command when activated... |
Beta Was this translation helpful? Give feedback.
-
I started working on this! It's still work-in-progress, but you can test it here: #165! |
Beta Was this translation helpful? Give feedback.
-
So... #165 got merged to the
Does it work properly on a touch screen? |
Beta Was this translation helpful? Give feedback.
-
Hi I managed to install the development branch and am currently testing out the new feature. So far this seems to be exactly what I suggested, I do have issues with it working using touch gestures though. Holding down does not function properly on my touch screen and instead simply opens the menu. Also it seems to also lock up which can be fixed by enabling/disabling the button. 2021-11-15.00-38-44.mp4I'll be more the happy to assist in debugging this issue though you may need to bear with me since I'm a novice to Linux and development in general. EDIT: Additionally when in the "locked in" state Application and Workspaces are also stuck and Alt+Tab soft locks the system being unable to get off the menu. 2021-11-15.01-00-53.mp4 |
Beta Was this translation helpful? Give feedback.
-
Then you'll have to learn some JavaScript 😛. Or, if it turns out to be more complicated, I'll have to find a touch screen somewhere... All the important code is in src/extension/TouchButtons.js. You can edit this file in any text editor. After you changed some code, save it and call For simple debugging you can insert a line like journalctl -f -o cat | grep -E 'flypie|' For example, you could add the above line 374 of the TouchButtons file, run I am not sure whether the long press action is not recognized or whether the dragging of the button is not working... const action = new Clutter.ClickAction({
long_press_duration: 2000, // Duration required for long press, in milliseconds.
long_press_threshold: 200 // Maximum allowed movement during long press in pixels.
}); Then you could play with the values and see whether this changes the behavior.... Another thing is that I grab the complete pointer input during the movement of the button (line 359 and 360). This is done to prevent "loosing" the button during quick dragging movements. You could try to disable the two lines with comments ( // Clutter.get_default_backend().get_default_seat().get_pointer().grab(actor);
// global.begin_modal(global.get_current_time(), 0); And test the difference. The more I think about it, the clearer I see a potential problem here: I grab the pointer device. However, quite likely, touch input is not considered to be pointer input. Therefore the UI may feel like being "locked"... Maybe it only reacts to mouse input in this state...? Maybe I'll have to find out which device triggered the long press action (touch or pointer) and grab this device... Anyway, you should try the things above and report any findings! If anything of the above wall of text is unclear, feel free to ask for more details 😉 ! Happy debugging! |
Beta Was this translation helpful? Give feedback.
-
I just discovered that one can actually connect to touch events. Now I wonder whether the touch events are automatically translated to button-press and button-release events...? You could add actor.connect('button-press-event', () => {
utils.debug('button press!');
return true;
});
actor.connect('touch-event', () => {
utils.debug('touch!');
return true;
}); to the other handlers (e.g. line 296) and test when they get called! On mouse clicks, only the top one should be fired. But on touch-clicks...? Thanks for your time! |
Beta Was this translation helpful? Give feedback.
-
Setting the long_press_duration to 100 seems to work, also opening the menu while my figure is sliding is what is causing it to lock up: 2021-11-16.04-58-19.mp4 |
Beta Was this translation helpful? Give feedback.
-
Today, I managed to get hands on a touch screen and had some time to implement several fixes. There is some weird behavior in Clutter and I needed several workarounds to get touch and mouse input working at the same time on both X11 and Wayland. But I think it works now quite well. I'll also try stylus input on a Wacom tablet in the coming days. I would really appreciate it if you could test the changes and report any bugs you find! Here is the pull request: #168. You can test it with the following commands in your cloned Fly-Pie repository: git pull
git checkout feature/touch-input
make install And then restart GNOME Shell. |
Beta Was this translation helpful? Give feedback.
-
I'm a bit nervous about discussing this as it's something so specific to my setup that it's probably not even worth bringing up but I would love an option to have a button on screen at all times to activate a custom menu.
I'm currently running Fly-Pie on my Surface Pro 7 running Pop-OS with the Surface Kernel and when I don't have my keyboard attached I don't have an easy way to activate Fly-Pie.
You could have the button be moved while held down and activate on release.
Beta Was this translation helpful? Give feedback.
All reactions