LINUX programming

Moderators: ITA
Number of threads: 1347
Number of posts: 2935

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Move an application window outside the desktop bounds? Posted by caravanio on 28 Apr 2011 at 7:18 AM
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.





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.