Giter Club home page Giter Club logo

Comments (11)

takinoy avatar takinoy commented on August 22, 2024

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

from xfce4-windowck-plugin.

fthpi avatar fthpi commented on August 22, 2024

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);

from xfce4-windowck-plugin.

takinoy avatar takinoy commented on August 22, 2024

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!

from xfce4-windowck-plugin.

fthpi avatar fthpi commented on August 22, 2024

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.

from xfce4-windowck-plugin.

takinoy avatar takinoy commented on August 22, 2024

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)

from xfce4-windowck-plugin.

fthpi avatar fthpi commented on August 22, 2024

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.

from xfce4-windowck-plugin.

takinoy avatar takinoy commented on August 22, 2024

Ok.
I can consider adding such feature with mouse action (Alt+click_button1 or triple click)...

from xfce4-windowck-plugin.

waldnercharles avatar waldnercharles commented on August 22, 2024

I see that this is a fairly old request, however - I too am looking for something like this.

from xfce4-windowck-plugin.

n1trux avatar n1trux commented on August 22, 2024

👍 me too!

from xfce4-windowck-plugin.

rrika avatar rrika commented on August 22, 2024

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.

from xfce4-windowck-plugin.

godcrying avatar godcrying commented on August 22, 2024

any new process recent?

from xfce4-windowck-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.