Announcement

Collapse
No announcement yet.

How does a window manager actually work?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How does a window manager actually work?

    Hi,

    I'm kinda searching for in depth information about how a window manager actually works.
    The thing i'm interested in most is the pixmaps that it must make at some point in time right?

    When i want to do (or try) is make a very basic very primitive - proof of concept only - window manager that does the drawing with QML, the logic should all be in C++/Qt. The reasoning behind this is that you get all the graphical power that QML has for free! So free effects, blur, other animations! Even shaders in QtQuick 2.0. But the thing i can't seem to figure out is how a window (not the decorations, but the actual window content) is being build up and who is responsible for it. Does it somewhere end up with a pixmap which can just be "blitted" to the screen thus can also be send to a QML element?

    And even if everything ends up being a pixmap, then how can i ever get keyboard and mouse events working? I mean.. it's a picture, how do i know which event to place where and how do i even do that?

    I'm actually hoping someone somewhere has a extremely basic 2 source file Qt example somewhere
    Note: while writing this i found: http://gitorious.org/qt-window-manager#more might be interesting.

    I hope someone could shed some light on this since having a window manager that really taps in the power of QML seems like a perfect next step for graphical linux environments.

    Kind regards,
    Mark

  • #2
    anyone please?

    Comment


    • #3
      A traditional window manager tells a program where its window is, the program then draws that itself. A compositing window manager gets the window content as an opengl texture, and draws those where and how it wants. For more details, examine the sources of some simple wms.

      Comment


      • #4
        Originally posted by AnonymousCoward View Post
        A traditional window manager tells a program where its window is, the program then draws that itself. A compositing window manager gets the window content as an opengl texture, and draws those where and how it wants. For more details, examine the sources of some simple wms.
        Do you perhaps have any suggestions? I prefer ones that already use Qt

        Comment


        • #5
          Originally posted by markg85 View Post
          Do you perhaps have any suggestions? I prefer ones that already use Qt
          Let me Google that for you:
          qlwm: c. 5000 LOC
          antico--there are at least 4 different forks, I won't try linking one; the "light" version is 32 MB, so I'd hesitate to recommend
          Egg Window Manager (aims for "simple, well-documented code")
          So that's 4 wm's, including the one you found--do you think that you need any more?

          Comment


          • #6
            Originally posted by Ibidem View Post
            Let me Google that for you:
            qlwm: c. 5000 LOC
            antico--there are at least 4 different forks, I won't try linking one; the "light" version is 32 MB, so I'd hesitate to recommend
            Egg Window Manager (aims for "simple, well-documented code")
            So that's 4 wm's, including the one you found--do you think that you need any more?
            Thank you for that although i still need more
            I need a window manager that has compositing with opengl. Then preferably in Qt..

            KWIN is a nice example, but WAY to big...

            This is how i currently think this can be implement in QML/Qt:
            1. C++ side that gets the window and fetches the GLTexture (or whatever it is) objects -- this is where i don't know how to do it
            2. C++ side makes a custom QML components. Lets call it "OpenGLWindow" and makes the available windows usable in QML -- i can probably do this
            3. QML side draws windows -- just QML, i can do that

            Done, C++/QML based Window manager with all the graphical power of Qt.
            But in order to get there, i still need to know the raw basics to even get started. I need to know how to do "1." in order to proceed to the next one and i'm already stuck there.

            Comment

            Working...
            X