Find the answer to your Linux question:
Results 1 to 5 of 5
So a friend has asked me to write a very minimal window manager for his car pc. One of the requirements is that he has a "docked" control panel on ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2008
    Posts
    4

    Xlib window docking?


    So a friend has asked me to write a very minimal window manager for his car pc. One of the requirements is that he has a "docked" control panel on the left side of the screen. I'm guessing this would be something similar to the standard panel apps that come with gnome and kde. So my question...

    With xlib, how do I "dock" a window on a certain side of the screen and force all other windows to be drawn next to this window?

    I am able to create an x window and interact with it, so I'm not illiterate when it comes to X programming. Just not an expert...

    Thanks,
    mw

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    You will find Chapter 16 of the XLib's programming manual interesting.
    Chapter 16. Window Management
    Debian GNU/Linux -- You know you want it.

  3. #3
    Just Joined!
    Join Date
    Sep 2008
    Posts
    4

    Lightbulb to clarify...

    GNU-Fan, thanks for the link! Very informative, and answered a few other questions that I had.

    But I want to make sure I understand the manual correctly. It seems that my window manager will have to somehow know the panel I make is special, and adjust all other windows accordingly, and make sure that no new windows get painted over top of the panel. Is this correct, or did I miss something big in there? I'm going to go back and read it again, but any guidance is definitely appreciated.


    Thanks,
    mw

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    If you write you own WM, it has the last word on how and where the top level windows are displayed. So if you deem a window special if it has a certain attribute or was created by a certain program, the WM can give it special treatment. Also, the WM can create windows on its own too.

    To ask the WM for special treatment an application could use the WM hints as described here ICCCM - Client to Window Manager Communication

    But, again, it is up to the WM if, and how, he respects such wishes.

    BTW. Today, there are so many window managers around.
    X window manager - Wikipedia, the free encyclopedia
    I think it might be a good idea to find one that embodies you ideas best and then modify it. Writing such a thing from scratch could be reinvention of the wheel.
    Debian GNU/Linux -- You know you want it.

  6. #5
    Just Joined!
    Join Date
    Sep 2008
    Posts
    4
    Sweet! It's now working after using the WMHints you said to use!

    And yes, I've taken a few small window managers (TinyWM, and Matchbox, to name a few) and pulled code in from all of those.

    Thanks for your help dude, once I get a solid code base working, I'll be sure to post an example of the solution to get this to work.

    Thanks again!
    mw

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •