LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-28-2013, 03:54 PM   #1
moo-cow
Member
 
Registered: Mar 2006
Distribution: Debian
Posts: 105

Rep: Reputation: 26
Draw to X screen on top of all windows


I'm trying to write a little volume bar application for my desktop. I want the volume bar to be displayed on top of all other windows *and* on top of any application running in fullscreen mode.

I was thinking about using Xlib to draw a simple "pop-up" window that displays the volume bar and disappears after 2-3 seconds. The problem is that the window will not be visible if a program is occupying the full screen. Any ideas? Btw, I don't need a window around by volume bar, so if there's a method to draw to the screen directly I'll be fine with that.
 
Old 07-29-2013, 10:23 AM   #2
thirdm
Member
 
Registered: May 2013
Location: Massachusetts
Distribution: Slackware, NetBSD, Debian, 9front
Posts: 316

Rep: Reputation: Disabled
Xlib has a function called XRaiseWindow.

How well do you know your window manager? Myself I would look for solution there. If it's a simple wm maybe you could even hack its code so it can keep windows of your program's class on top. Or for a really simple way out, the wm I use, cwm, has a concept of a gap that's configurable. It's an area of the screen that's left empty for things like this. cwm's maximize window command respects this gap configuration setting so your clock and stuff don't get hidden by other windows. It let's cwm get away without needing any concept of a "keep on top" property for windows. Maybe yours has something like that? Or some kind of tray or applet API?
 
Old 08-01-2013, 06:02 AM   #3
moo-cow
Member
 
Registered: Mar 2006
Distribution: Debian
Posts: 105

Original Poster
Rep: Reputation: 26
Thanks for your reply. I'm using GNOME 3, but I want to switch because it sucks. I cannot use the tray because the volume bar would be covered e.g. by a YouTube video running in fullscreen. I tried XRaiseWindow(), but I does not raise a window "high enough", programs running in fullscreen are still higher.
 
Old 08-01-2013, 06:10 AM   #4
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 321

Rep: Reputation: 81
I would look at amarok code, it has a feature like this.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
all windows open above the top of the screen svriderpokey Linux - Newbie 2 05-28-2008 08:21 AM
[SOLVED] my windows keep getting set to be stuck to the top of my screen i cant move any down jamison20000e Linux - General 11 11-26-2005 05:37 PM
[SOLVED] My windows keep getting set to be stuck to the top of my screen jamison20000e Linux - General 1 11-19-2005 02:44 PM
[SOLVED] My windows keep getting set to be stuck to the top of my screen jamison20000e Linux - Software 3 11-19-2005 01:48 PM
Drag windows above top of screen in Gnome Haiyadragon Linux - General 3 03-15-2005 05:25 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration