ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi all
we know that click on the tittlebar we can move the window, but
is there any widget(window) that is movable(means we have to click the mouse button in the middle of the window , and move the window)
Window placement and movement is something which the Window Manager deals with, and as such it depends which desktop environment you are using. For example, in XFCE, you can alt + left-click anywhere on a window and then drag to move it about.
It is not something in your code. The window manager is what controls this, not the programs themselves. If your window manager intercepts alt-left drag, your application probably won't even see the event.
It is not something in your code. The window manager is what controls this, not the programs themselves. If your window manager intercepts alt-left drag, your application probably won't even see the event.
will u please make corrections in my code to get window movement?
Munna, changing your code cannot fix the problem. Window movement is part of your window manager, which is part of your desktop environment if you use something like KDE or Gnome.
Let me try to explain. What you want to do is *not* controlled by your program. It is controlled by the *window manager*. You can't write code into your program which will make the window movable by clicking and dragging on the middle of the window. Most window managers will do nothing when you click and drag on the middle part of the window. Clicking on the middle of the window causes the window to be focused under most window managers, but dragging from the middlw will do nothing. However, several window managers will allow you to drag from the middle of the window if you press the ALT key while dragging with button 1 of the mouse.
The only way to get your program to do what you want would be to include code which intercepts all clicks on the desktop -basically disabling the window manager which you probably do not want. You might examine the code from programs for handling desktop icons to find a way to do this(ROX-Filer and fbdesktop are two examples). However the icons are unbordered windows which may not be what you want.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.