Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brisk-menu causes Super to not be usable to move/resize windows in MATE #96

Open
jpleau opened this issue Apr 28, 2018 · 15 comments · Fixed by getsolus/brisk-menu#4
Open

Comments

@jpleau
Copy link

jpleau commented Apr 28, 2018

Hi.

brisk-menu 0.5.0-7ubuntu1

Fresh install of Ubuntu Mate 18.04. I configured the window manager to use "Super" instead of "Alt" so I can quickly resize and move windows by grabbing them and pressing "Super".

This doesn't work if I have "Super" configured to open up brisk-menu. Pressing "Super" and attempting to move/resize a window does nothing, but when I release the mouse, brisk-menu opens.

Ubuntu Mate 18.04 seems to contain the commits from #88 (as 1005_prevent_super_key_swallows_on_compiz.patch).

I tried working around this by configuring brisk-menu to use F1 as the shortcut, and using a program like "ksuperkey" to map the release of "Super_L" to "Alt+F1", but this doesn't work on my install (pressing Super_L does nothing, but pressing ALT+F1 works).

Any suggestions on how I could fix this?

@jpleau jpleau changed the title Cannot use Super to move/resize windows in MATE brisk-menu causes Super to not be usable to move/resize windows in MATE Apr 28, 2018
@TLogiviere
Copy link

TLogiviere commented Apr 30, 2018

Hello,
The same problem force to change i3wm and gnome-session(-flashback) modifier key to something else than Super_L or to change it for something less ergonomic.
This is an issue as it prevents smooth integration in desktop environment using this key as main modifier.
Would love to see Brisk-menu to let the event propagate if it don't know what to do with the key combination.
One question though : how it happens that Brisk-menu is intercepting the key event before my window manager or gnome-session ?

@Misko-2083
Copy link

Hi,
I disabled the brisk menu hot-key, used ksuperkey to remap Super_L key release to "Ctrl+Shift+Escape" and set the "Ctrl+Shift+Escape" to run next script (requires xdotool): https://gist.github.com/Misko-2083/9d802269db03e118dc756598d0c33fce
It's a little slow but works for me. 😆
The brisk menu hot-key can be disabled with dconf-editor or via gsettings.

@TLogiviere
Copy link

Hello,
Yup definitely a workaround 😆
But it would be nice to get this otherwise nice software improved by releasing the event if it can't use it. I mean its what a peripheral software absolutely should do...

@ikeydoherty
Copy link
Member

I don't see a bug here. You have super key bound for two actions and two things are fighting with it.

@Misko-2083
Copy link

In Xfce4 there is a command that launches Whisker menu: xfce4-popup-whiskermenu
It's a wrapper that runs a panel plugin

ATPOINTER=false
/usr/bin/xfce4-panel --plugin-event=whiskermenu:popup:bool:$ATPOINTER

I don't know if mate-panel can handle plugin events. Perhaps launching the brisk menu from a command line would be usefull in situations like this.

@vkareh
Copy link
Contributor

vkareh commented May 6, 2018

A panel plugin won't solve the issue, as it still needs a global key binding for Super. The only thing I can think of at the moment is tracking mouse button presses on Brisk and cancelling the keypress listener when Super+Mouse-button-press happens.

Another thing that could improve compatibility would be to add a timeout, where if you press the Super key for longer than, say, 250ms, it also cancels the opening of the menu.

We already do both these things for mate-hud, which means I can use Alt+Click+Drag on windows, while still having the HUD bound to Alt

@TLogiviere
Copy link

TLogiviere commented May 6, 2018

What Misko suggests is to remove the binding in the conf of brisk-menu and create one within the session keybinding handler (in my case gsd-mediakeys) to open the menu.
It could be a solution here, as gnome-session keybinder works well even if many shortcuts start with the same modifier, but it needs to be allowed by brisk-menu.
Still, I don't get why the menu swallows 'Super+somekeys' even when it is only bonded to 'Super'.

@vkareh
Copy link
Contributor

vkareh commented May 6, 2018

But it doesn't. If it swallows Super+OtherKey, that's a separate bug. It certainly doesn't affect me, so I wonder what could be causing that on your system?

@vkareh
Copy link
Contributor

vkareh commented May 6, 2018

Also, I'm not sure we should have the mate-settings-daemon handling bindings for third-party apps, where do you draw the line there. We've made enough changes to both m-s-d and marco to support apps like Brisk et al having these types of keybindings, we shouldn't need to special-case them.

As I said, we've already fixed this for other apps that use the Alt key (which is harder than the Super key to account for), so my proposed solution should also be able to work for Brisk with the Super key.

@TLogiviere
Copy link

i3wm + gnome-session-flashback started by gdm (so no m-s-d running...)
Anyway, I just switched to vala-panel which works well with this setup.
Sorry jpleau for hijacking the issue, its all yours now ^^

@jpleau
Copy link
Author

jpleau commented May 13, 2018

@ikeydoherty Then how do you explain in gnome-shell for example I can press Super to open the overview, but if I press Super and mouse-click a window the overview won't open and I can drag / resize my windows (and of course the overview doesn't open after I'm done with the windows)

I always had that behavior in most DE. In some cases is requires a bit of fiddling around (ksuperkey / xcape), for example with Xfce and Whiskermenu. But I didn't find a way to to do that with Brisk-menu in MATE that works correctly.

The way gnome-shell seems to do it is going by this logic:

If I want to drag a window:

  • KEY is pressed (for example Super_L)
  • Another action happens while KEY is still pressed (mouseclick, window action, etc)
  • KEY is released, nothing else happens

If I want to launch the overview

  • KEY is pressed (for example Super_L)
  • KEY is released, the overview opens

Would something similar be possible? Detect between the key press and release if another action was initiated and cancel opening the menu if so?

@vkareh
Copy link
Contributor

vkareh commented May 13, 2018

That's exactly what I proposed above. I just haven't had time to implement it for brisk. We did the same thing for Alt (which opens the mate HUD) and Alt+ClickDrag (which moves/resizes windows in Marco).

@jpleau
Copy link
Author

jpleau commented May 13, 2018

@vkareh sorry I must have mis-read. Glad to hear it's on the table though, I'll keep an eye on this

Thanks!

vkareh added a commit to vkareh/brisk-menu that referenced this issue May 24, 2018
This fixes an issue when Brisk swallows ButtonPress events when window manager is set to Super as its modifier key for moving and resizing windows.

Fixes solus-project#96
@vkareh
Copy link
Contributor

vkareh commented May 24, 2018

@ikeydoherty - I submitted a fix for this: #101

I've tested this using Compiz, Marco, and Metacity (there might be some edge cases on the latter, but it works). Have not tested on i3wm, as I've never been able to set it up properly without messing up my desktop.

@TLogiviere - Would you mind testing this on i3wm?

@jpleau
Copy link
Author

jpleau commented Jul 2, 2018

Hi, sorry for the delay

@vkareh I just tested your fix, can confirm it works perfectly here! (On mate)

Thanks!

vkareh added a commit to vkareh/brisk-menu that referenced this issue Mar 8, 2019
This fixes an issue when Brisk swallows ButtonPress events when window manager is set to Super as its modifier key for moving and resizing windows.

Fixes solus-project#96
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants