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.
Is it possible to create a window (with GTK+, GDK, or by using OpenGL, or Clutter) that stays on the top of all the other windows, even over a full-screened window?
I want to create a small window that remains visible when I enter the full-screen mode of a video player (VLC for example).
First you need to grab the "deskop window" from your window manager or make a fixed window yourself or do it in X directly(not recommende).
Then with that window you have to add a child and raise the window set signals so you lower it or raise it as you want(wen entering, leaving etc) or you can set it so its fixed on top.
Do you think I should get the Display object of the 'VLC media player' window and start drawing on it? Do I need special permissions to do that?
I also tried the following (Clutter and X11 together):
Code:
clutter_init (&argc, &argv);
ClutterActor* stage = clutter_stage_new();
// 'p' is the xid of 'VLC media player' main window
// I found 'p' using "xwininfo -root -tree" command
clutter_x11_set_stage_foreign(stage, (Window)(p));
clutter_container_add_actor ((stage, rectangle);
// rectangle is just an object (a ClutterActor, more precisely).
With this, I've got the following run-time error [where 0x4800037 is the xid of VLC's window]:
ClutterGLX-CRITICAL **: Unable to make the stage window 0x4800037 the current GLX drawable
Clutter library is using OpenGL for rendering. Could this be a problem?
Anyway, using Clutter is not actually a 'must'. I haven't try with GTK yet.
Example of what I would like to do: when I watch a video (full screen), I sometimes get notifications from Network Manager (it gives me information regarding the Internet connection). I want to do something similar, I want to draw on the top of the 'fullscreen'.
Is the X11 example from Wikipedia (link above) a good start to do that? Any advice is welcome.
Thank you a lot for your help, kalleanka!
The example works fine
The only problem is that an application running in full screen mode covers the little window. Well, that is not actually a problem, I think I was a little stubborn about creating such a window. I realize now that it isn't really possible. That is, when an application goes into full screen mode, it says: "The screen is only mine now, so... stay away of it!"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.