xfce4-windowck-plugin
xfce4-windowck-plugin copied to clipboard
[Feature Request] Moving Windows
Hi, can you add move windows drag window with title feature? Like cinnamon Window Buttons with Title applet. (http://cinnamon-spices.linuxmint.com/applets/view/184). If you add this option, maybe i use xfce for default DE :) thanks
To move windows left click on icon window button and select move in the menu. You can double click on the title to unmaximize the window.
What you want is move windows by dragging the title? I'll see how to implement it Cheers,
Cédric
Thanks Cédric. Moving windows is more than easy double click for snap window. I am developer cinnamon Window Buttons with Title applet. I use below code (but this code use gnome-shell classes most probably not aid for you) for move window;
//Set cursor position on windows title
let pointer = Gdk.Display.get_default().get_device_manager().get_client_pointer(),
[scr,,] = pointer.get_position(),
rect = current_window.get_outer_rect(),
x = rect.x + rect.width / 2,
y = rect.y;
pointer.warp(scr, x, y);
// End of set cursor
//Move windows
global.display.begin_grab_op(global.screen, current_window,Meta.GrabOp.MOVING, false, true, 0, 0, global.get_current_time(), x, y);
Hello,
Thanks for your answer. My applet is written in C not in Java but that could help a bit. My first problem is to find a proper way to grab windows in C. I use the wnck library for managing window and there is not convenient function to grab window directly....
I try to do my best but I'm quite new in developing panel applet, so your help is welcome!
Hi, I am newbie apple developer too, i can suggest temporary solution. You can control keyboard with xdotool, you can use below command for grabbinng window; xdotool keydown key alt+F7 I don't know C well but i estimate a solution. Firstly, get pointer position (x,y) (there are sample codes written in C) after you can set windows geometry (same pointer position until release button) with wnck_window_set_geometry () function (https://developer.gnome.org/libwnck/stable/WnckWindow.html). This is only estimation, as i said, i am newbie.
Hello,
To grab window with keyboard method in C we could use wnck_window_keyboard_move (WnckWindow *window);
that do the same thing as the move command in the icon title menu or xdotool keydown key alt+F7
.
I've tested it in may code and that work well, despite the fact that we need to click with a button on the title (double click in my case), not drag on it... It's not very intuitive. Also, the problem is I already use double click to unmaximize window and it's the default behaviour for xfwm4...
For implementing grab window with mouse method, I've also considering using wnck_window_set_geometry
function but I do not managed to get it working for now...
In fact, even if I managed to get it working, I will not be very happy with that solution because it can't reproduce the native behaviour of xfwm4 window dragging. Especially edge tilling.
(That doesn't solve this issue but you can also press Alt+click on window to easily move it)
Hi, I see, you are right. I found a solution. I am using compiz as window decorator. In compiz config settings, i defined command (top+click button1) for "xdotool keydown key alt+F7" command. Now, it is better. Thanks your concern.
Ok. I can consider adding such feature with mouse action (Alt+click_button1 or triple click)...
I see that this is a fairly old request, however - I too am looking for something like this.
:+1: me too!
I prototyped this feature in my fork. It triggers on button press instead of drag though.
EDIT: wnck_window_keyboard_move
does the same as my code, except it sends _NET_WM_MOVERESIZE_MOVE_KEYBOARD
instead of _NET_WM_MOVERESIZE_MOVE
. I wonder if that should be reported as feature request on libwnck.
any new process recent?