Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-03-18 17:28:00

Led_Astray
Member
Registered: 2022-05-20
Posts: 10

"Window Operations Menu" on mouse?

Hello. There's a good option to use Window operations menu (Alt+Space by default). However, on other DEs it can be assigned to Super+MMB or Super+RMB so the menu appears right under the cursor. Can the same behavior be achieved on Xfce?

Offline

#2 2023-03-18 18:26:38

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,000

Re: "Window Operations Menu" on mouse?

Super+RMB should work out of the box (also just RMB, Ctrl+RMB and Shift+RMB should work).

Which distro, version of Xfce and version of xfwm4 are you running?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2023-03-18 20:09:04

Led_Astray
Member
Registered: 2022-05-20
Posts: 10

Re: "Window Operations Menu" on mouse?

Super+RMB resizes windows for me. RMB, Ctrl+RMB and Shift+RMB all do the same thing, just a regular context menu
I use Fedora 36 Xfce spin, Xfce and xfwm4 versions are 4.16.1

Offline

#4 2023-03-18 22:12:21

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,000

Re: "Window Operations Menu" on mouse?

Do you have Super set as your easy_click modifier? Settings Manager > Window Manager Tweaks > Accessibility > "Key used to grab and move windows"? If so, and if you change it to its default "Alt", do things work as expected again?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2023-03-19 04:56:22

Led_Astray
Member
Registered: 2022-05-20
Posts: 10

Re: "Window Operations Menu" on mouse?

I do. But when I change it to Alt, it's the same except Super+RMB doesn't do anything anymore
Changing it to Alt is a no-go though, it breaks the functionality in all the software I use

Offline

#6 2023-03-19 13:29:40

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,000

Re: "Window Operations Menu" on mouse?

What about just RMB alone on the titlebar? This should bring up the popup menu by the pointer.

If you have Super as your easy_click, you won't be able to use it elsewhere in xfwm4.

Also, is this specific to some windows? For example, on GTK-based applications that have a title/header it should work. I'm not sure about QT windows and firefox/chrome if they are using their own titlebars.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2023-03-20 03:37:00

Led_Astray
Member
Registered: 2022-05-20
Posts: 10

Re: "Window Operations Menu" on mouse?

On the titlebar it works fine for all the windows, it's just useful to have it right under the cursor, especially when you use a theme like border-only that gets rid of titlebars

Offline

#8 2023-03-20 11:06:28

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,000

Re: "Window Operations Menu" on mouse?

So to confirm, if you use a window manager theme like the default one, you can right-click on the titlebar and have the window menu popup at the mouse cursor location?

But with the border-only theme, it doesn't work? Because its difficult to target the 1 or 2px border with the mouse?

Is this correct?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2023-03-20 17:36:21

Led_Astray
Member
Registered: 2022-05-20
Posts: 10

Re: "Window Operations Menu" on mouse?

No. The problem is not the lack of functionality, just a quality-of-life thing. I want to be able to click anywhere on the window and get the same menu as by right-clicking the titlebar, like on GNOME, for example. By default it's Modifier key+RMB or MMB

Offline

#10 2023-03-20 19:05:51

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,000

Re: "Window Operations Menu" on mouse?

Ok, thanks for the confirmation. I understand now. I believe thats a mutter thing - xfwm4 doesn't provide this functionality. You can open an enhancement request for this functionality if you want to pursue it further.

I've been looking at ways to mimic this functionality and have come up with something that kind of works. You will need xdotool and xbindkeys installed. Basically, the script below automates the clicking of the RMB on the window titlebar by getting the mouse location, the current window geometry and clicking at the same Y location of the mouse but adjusted to land on the titlebar. This will move the window menu horizontally, but it is not possible to place it vertically as it must be anchored to the titlebar.

If want to give this a try, save the following script on your system and make it executable:

#!/bin/bash
# requires xdotool, xbindkeys
#   add to ~/.xbinkeysrc:
#      /path/to/script
#	 Mod4 + Super_L + b:3 + Release

#xfwm4 titlebar height-5
TBHEIGHT=21

#mouse location
MOUSE=$(xdotool getmouselocation)
MX=$(echo $MOUSE | awk '{print $1}' | awk -F':' '{print $2}')
MY=$(echo $MOUSE | awk '{print $2}' | awk -F':' '{print $2}')

#active window geometry 
WINDOW=$(xdotool getactivewindow getwindowgeometry --shell)
WX=$(echo $WINDOW | awk '{print $2}' | awk -F'=' '{print $2}')
WY=$(echo $WINDOW | awk '{print $3}' | awk -F'=' '{print $2}')

#modified window y value to account for titlebar 
WY=$((WY-TBHEIGHT))

#move mouse to title bar and button 3 (right) click 
xdotool mousemove $MX $WY click 3 

...you need to edit the value of TBHEIGHT in the script to be the height of xfwm4's titlebar minus 5 pixels. To get this value, look at the contents of your xfwm4's title-3-active.xpm file (the value will be the second value on the line right after "static char *").

Then create (or add to) ~/.xbindkeysrc the following content:

/path/to/script
	 Mod4 + Super_L + b:3 + Release

And finally, start xbindkeys:

xbindkeys

Then if you Super_L + RMB on a window, it should popup the windowmenu horizontally-adjusted to the mouse position.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#11 2023-03-21 03:46:19

Led_Astray
Member
Registered: 2022-05-20
Posts: 10

Re: "Window Operations Menu" on mouse?

I see, thanks for your effort!

Offline

Board footer

Powered by FluxBB