Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Move an application window outside the desktop bounds?

I am currently using Qt 4.7.0 and 32-bit Ubuntu 10.10.
I have created a very simple application that draws a rectangle and has no border, no title bar and no buttons in it respectively - close, maximize, minimize.

If the user clicks the rectangle with the left mouse button and begin dragging the mouse cursor while holding the left mouse button, the rectangle will be dragged. On Windows and Mac it is possible to move the window out of the desktop bounds - you are only constrained to the position of the cursor.

On Ubuntu the rectangle, which is actually the application window, cannot be moved out of the desktop extents by this custom dragging functionality. It uses QWidget::move( int x, int y ) function which is the same as xlib's XMoveWindow.

Hitting Alt + and then dragging the window with the left mouse button makes the window go out of bounds but this is because Alt + LMB is handled not by the application but by the window manager.

How could I achieve the Alt+LMB effect - move the application window out of the desktop bounds using xlib? Should I set some window attributes - XChangeProperty, XChangeWindowAttributes?

The "XLIB Programming Manual" book says:

------------------------
Sixth, a window has a set of attributes. The window attributes control many aspects of the appearance and response of the
window:
...
Should this window be allowed to be displayed, moved, or resized without notifying the window manager?
------------------------

How to make the window not notify the window manager when the application window is moved, so that the application window can go out of its parent's bounds - the bounds of the root window?

I failed to achieve this using Qt, but I presume it is possible using xlib, I think.


Sign In or Register to comment.