LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-17-2012, 05:13 AM   #1
digiot
LQ Newbie
 
Registered: Nov 2012
Posts: 9

Rep: Reputation: Disabled
[ Solved ] Linux - How to check wether the deco/border is set or not


Hello Forum !

On my search for a solution to get the active window-id, I stumbled over this forum. You were listed
at the very top in Google, and it seems, not without any reason : I found the info in less than five
minutes, record-breaking !

So I will try to get another very essential info concerning windows in Linux here: How, and where, can
I get the state of the deco/border around a window ?

Greetings !

digiot

Last edited by digiot; 11-18-2012 at 04:12 PM.
 
Old 11-17-2012, 09:44 AM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 345Reputation: 345Reputation: 345Reputation: 345
Sorry, what do you mean by the "state"? What sort of states are you thinking of? As in, is it maximised, minimised or floating? Or something different?
 
Old 11-17-2012, 10:16 AM   #3
digiot
LQ Newbie
 
Registered: Nov 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
Hey Snark1994 !

Oh, I just mean, if deco or border exists or not.
Somewhere there must be the setting, but I don't know where.
 
Old 11-17-2012, 10:21 AM   #4
Snark1994
Senior Member
 
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 345Reputation: 345Reputation: 345Reputation: 345
I'm still not 100% sure of what you mean.. Can you show a screenshot of a window with a border and a window without? I mean, some window managers don't use borders (like XMonad), but if you're trying to work out which window manager the person is using then I feel you're not doing Good Things.

Perhaps a better question for me to ask is "What is your end goal? What are you actually trying to achieve?"

Sorry if I've just misunderstood what you're saying...
 
Old 11-17-2012, 11:23 AM   #5
digiot
LQ Newbie
 
Registered: Nov 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
@ Snark1994 : It's more my limited English, I fear.

Some time ago I used Xmonad, too. My absolutely favourite WM,
but its Haskell-config is far out of my knowledge!
But what I remember is, that you can have pure borders in
Xmonad for sure.

I don't think, we need a screenshot here, let me try to explain:

The borders are what Xmonad,also my Openbox and many other WMs are
providing. They can be displayed around the window, if there is no
decoration.

The decoration is the standart what you may have around the window,
with the buttons and handles on it. You can toggle them on and off,
and that's my problem:

I just need to know, if the decos/borders are on, or if the window
is totally naked, means, not anything around it.

It's needed for a session-restore-script I'm working on.
 
Old 11-17-2012, 01:22 PM   #6
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,771

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
borders are the extra outline parts on the *sides* of a window. The top part is called the titlebar and the bottom part is usually called the resize ba, or something like that, because of being able to grab the corners to resize the window. Some window managers allow you to enable/disable each of these individually -of course some wm's don't even draw some or any of them.
 
Old 11-17-2012, 02:25 PM   #7
digiot
LQ Newbie
 
Registered: Nov 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
@ gnashley : Sorry, but there are 2 different kinds of window margins,
the decos and the borders. It's a little hard to differentiate between
them in words, they are all borders or margins or edges or rands...

Regardless of the used terms, I want to know, from where I can get
the info, if there are any "whatevers" around a particular window, or not.
 
Old 11-17-2012, 03:41 PM   #8
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,974

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
The denomination "border", "decoration" etc. depend on the libraries used, the windowmanager etc. and the X-server. If you want to know how it works on your system, you will have to look at which libraries the your windowmanager uses (is programmed with).

Markus
 
Old 11-17-2012, 04:05 PM   #9
digiot
LQ Newbie
 
Registered: Nov 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
@ markush : Yes, and that's the problem. I'm not such an expierienced Gtk/C-programmer,
more precisely, neighter nor!
I'm just a little Bash/Awk-scripting, and looking for the place where that infos are stored.
Much of the other window related infos are accessible through little GNU/Unix - helpers,
but that ones unfortunately not.
 
Old 11-17-2012, 04:11 PM   #10
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,974

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
When you use openbox (as you mentioned above), you should read it's documentation and probably look in the sources.

But I have another idea, I have used FVWM2 for quite some time and it is very good documented, they have a very good mailinglist. If you really want to understand, how such a WM works, I would recommend to install FVWM, http://www.fvwm.org/documentation/

Markus
 
Old 11-17-2012, 04:44 PM   #11
digiot
LQ Newbie
 
Registered: Nov 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
@ markush : You're right, Openbox is the WM I'm using, and it's
good documented and highly configurable, but that single part
I'm looking for seems only available as a setting.

The best sources you can look through are such knowledgebases
like in these forum.The big advantage is, that a forum works
interactive...

Fvwm was on my mind some time ago, but it's a real monster!
 
Old 11-17-2012, 04:47 PM   #12
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,974

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Quote:
Originally Posted by digiot View Post
...
Fvwm was on my mind some time ago, but it's a real monster!
Yup, it is

But you can find many templates for it's configuration. Look for example here http://ironphoenix.org/tril/fvwm/configs/

Markus
 
Old 11-17-2012, 05:07 PM   #13
digiot
LQ Newbie
 
Registered: Nov 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
@ markush : No, I will stay a while with the *boxes, I love them !
As you can see, I've problems enough in that tiny universe...
 
Old 11-18-2012, 04:44 AM   #14
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,771

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
xwininfo or xprop may be of some help.
 
1 members found this post helpful.
Old 11-18-2012, 11:10 AM   #15
digiot
LQ Newbie
 
Registered: Nov 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
@ gnashley : Yes, Xwininfo, Xprop, Wmctrl and others all became my friends.
I have looked through their different outputs, but it seems I will have no
luck with the deco issue.

Sometimes, you can't think stupid enough, so I had to be pushed with my nose
on the xprop -root option. The manual says, this option is only useful if you
have an "obscured rootwindow", which I hopefully never get, so I didn't try...

Logically thought, you can't get infos about any undetermined
window with xprop. It just works for a specified window, which
I don't have when I'm searching for it. So the rootwindow was
the right place !

But the deco-infos I need seemes to be deeply hidden inside Openbox, and contrary to its name, I will let the box closed !

Fortunatly, the absence of that info will not destroy the main intention
for my scripts. The placement of the windows, with or without any
decos/borders, is carried out correctly, and that is the essential point.

Having the right decos/borders for any particular window would "just" make
the script perfect, other, real professional DEs don't care about that...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
I want to impliment LVM on a Linux Comp, I am not sure wether it will help me or not shahid khan Linux - Newbie 1 06-24-2009 06:19 AM
Check wether a X server is running and ok johg Linux - Server 3 06-29-2008 02:32 PM
ethernet, unsure wether it is working for me Michael_aust MEPIS 2 01-09-2006 04:50 AM
Windows deco problem ZeroKun Debian 1 07-04-2004 02:07 PM
How can I check wether a file is empty in Linux by using shell script programming ??? Bassam Linux - General 2 02-26-2004 02:01 AM


All times are GMT -5. The time now is 05:10 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration