LWN.net Logo

St. Pierre: The Linux Graphics Stack

St. Pierre: The Linux Graphics Stack

Posted Jun 22, 2012 17:39 UTC (Fri) by magcius (guest, #85280)
In reply to: St. Pierre: The Linux Graphics Stack by apoelstra
Parent article: St. Pierre: The Linux Graphics Stack

> which seem very condescending and out of place. Many people use focus-follows-mouse (including myself -- I also use a tiling WM) and find it to be much superior to click-to-focus.

Sorry, it wasn't meant to be condescending, only show that X11 itself cannot itself enforce a basic policy for focus management. I've updated the tone of the article to respect that a bit better.

> I can't quite grok this, but I'm pretty sure he's saying that the entire Weston compositor is around 2-3KLOC, compared to the tens of KLOC used to implement the corresponding parts of the X subsystems. But his comment about mutter is rather disingenuous -- dwm, for example, is a complete X window manager in ~2200 lines.

That's what I'm saying. Was the language unclear?

dwm is an extremely simple window manager. It uses core X drawing protocols to draw its UI, even for drawing text, which don't have antialiasing. It doesn't do compositing.

Again, to set up the appropriate features for a modern desktop environment is as much code as it would be to write dwm, which is an extremely simple window manager.

> To run such a beast under Wayland, the dwm folks would need to write an entire compositor to talk to the kernel and manage the framebuffer, in direct conflict with the project's goal of having an easy-to-grok, easy-to-hack WM.

You don't have to use libdrm. You could use OpenWF or EGL, which manage that part for you.

> Perhaps somebody more knowledgeable than me could answer: Would it be possible to write a Wayland compositor that will talk to X window managers, so that xmonad/wmii/dwm/whatever will work without serious modification?

It's possible, but it would be difficult. At the same time, you'd have to implement a lot of features of the X, so you're better off running Xorg or Kdrive, and putting it under Wayland, like Xwayland.


(Log in to post comments)

St. Pierre: The Linux Graphics Stack

Posted Jun 22, 2012 18:08 UTC (Fri) by dlang (✭ supporter ✭, #313) [Link]

>> which seem very condescending and out of place. Many people use focus-follows-mouse (including myself -- I also use a tiling WM) and find it to be much superior to click-to-focus.

>Sorry, it wasn't meant to be condescending, only show that X11 itself cannot itself enforce a basic policy for focus management. I've updated the tone of the article to respect that a bit better.

What you see as a failure (X cannot enforce a policy) is seen by many others as a feature (you don't have to try and work around whatever X is enforcing and can instead implement whatever you want)

St. Pierre: The Linux Graphics Stack

Posted Jun 22, 2012 18:31 UTC (Fri) by magcius (guest, #85280) [Link]

I really don't see it as a failure. I see it as a compromise in history, which complicates behaviour a lot.

St. Pierre: The Linux Graphics Stack

Posted Jun 23, 2012 3:36 UTC (Sat) by drag (subscriber, #31333) [Link]

I don't see why wayland compositor enforcing policy is mutually exclusive with having the ability to change the policy if you don't like it.

St. Pierre: The Linux Graphics Stack

Posted Jun 22, 2012 19:01 UTC (Fri) by apoelstra (subscriber, #75205) [Link]

>Sorry, it wasn't meant to be condescending, only show that X11 itself cannot itself enforce a basic policy for focus management. I've updated the tone of the article to respect that a bit better.

It looks much better now, thanks.

>> I can't quite grok this, but I'm pretty sure he's saying that the entire Weston compositor is around 2-3KLOC, compared to the tens of KLOC used to implement the corresponding parts of the X subsystems. But his comment about mutter is rather disingenuous -- dwm, for example, is a complete X window manager in ~2200 lines.

>That's what I'm saying. Was the language unclear?

If you explicitly gave an estimate for how many lines of code X requires for these things, it'd be clear, I think. As it is, it takes a bit of thinking to understand what you're comparing to what.

Otherwise, this was a very clear and informative article, and cleared up a lot for me!

St. Pierre: The Linux Graphics Stack

Posted Jun 22, 2012 20:04 UTC (Fri) by Zizzle (guest, #67739) [Link]

> Sorry, it wasn't meant to be condescending, only show that X11 itself cannot itself enforce a basic policy for focus management. I've updated the tone of the article to respect that a bit better.

Does that imply that Wayland will enforce this policy and the policy will be click-to-focus?

If so, Wayland will be a non-starter for me.

St. Pierre: The Linux Graphics Stack

Posted Jun 22, 2012 21:17 UTC (Fri) by magcius (guest, #85280) [Link]

No. It's up to the compositor to enforce a policy now.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds