Re: client side decorations
Nothing has been said on this thread in some time, but I'd like to raise another issue. Clients have a menu or other means by which they access window manager functions. Things like move to desktop 2. However this assumes a *lot* about the desktop model being used by the compositor, and fixes it to whatever the toolkits decide. It would not be possible to cleanly make a compositor which used any other way to manage windows. Tiling is one good example, the tasks used in kde4 are another. I was a strong believer in CSD until I realized I don't want to have to change the toolkit to make a new compositor feature usable/visible. On Mon, May 9, 2011 at 10:52 PM, andre.knis...@gmx.de andre.knis...@gmx.dewrote: Actually, I think Iskren made a very important point. To take this one step further: with CSD, we can't force the client to stop drawing the decoration, we can only tell the client that it should. So we can assume Chrome having a decoration for example, what shouldn't be possible in a tiling WM. Together with the other things he said, it would be almost impossible to get a useable/useful tiling WM with CSD. To the shortcuts discussion: do you really want every user to remember shortcuts to use his desktop? This would be a huge step backwards for the process of getting Linux on the desktop. Everything the average user wants to do must be doable within the UI, and closing/moving dead windows out of the way belongs to this. André - Reply message - Von: Daniel danl...@terra.es Datum: Mo., Mai. 9, 2011 23:29 Betreff: client side decorations An: Bill Spitzak spit...@gmail.com Cc: Høgsberg k...@bitplanet.net, Peng Huang shawn.p.hu...@gmail.com, Sam Spilsbury smspil...@gmail.com, Mike Paquette paquette...@gmail.com, wayland wayland-devel@lists.freedesktop.org, mal...@lavabit.com, krist...@freedesktop.org, microcai micro...@fedoraproject.org El dg 08 de 05 de 2011 a les 09:47 -0700, en/na Bill Spitzak va escriure: Though it is possible, I don't like the idea of clients sending hints about what areas are the close box or window border, since it implies there are such concepts as title bar and close box. The compositor can just have clicks anywhere raise and move the non-responsive window, and lots of clicks (indicating user frustration) pop up a box offering to kill the program. On Linux, since it is standard, compositors can also have Alt+click always raise/move windows, and alt +right click pop up a menu of compositor-side window actions. This would be actually a good way to handle it. Use an special mode or tool, a la xkill, to deal with stuck applications. It can take the form of an special key/mouse combination, gestures, or as I said before, an external tool like xkill. Note that it needs not be limited to killing, but could do any other thing, like minimizing, sending to another virtual desktop, etc. ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
* microcai micro...@fedoraproject.org schrieb: When app lock up, the wayland can start a remote-thread inside the client, and this thread can handle move/drag stuff or even terminate the process. This can be implemented as a signal hander inside libwayland-client, or no need to start the thread at-all. Wow, what a reliable proposal. Server relies on client not doing bad things. When the client locks up, it's normally far too late to do anything useful there ... So the libwayland-client must juse one signal internally. But there is no problem here. GUI app usually don't use signals. Really ? cu -- -- Enrico Weigelt, metux IT service -- http://www.metux.de/ phone: +49 36207 519931 email: weig...@metux.de mobile: +49 151 27565287 icq: 210169427 skype: nekrad666 -- Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme -- ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
On Thu, May 12, 2011 at 10:15:31PM +0200, Michal Suchanek wrote: That's not really true. Of course, there are things that look awful in different DPI (or because you happen to have slightly different fonts than the author) because they were done by braindead people. This includes but is not limited to - many web sites - (some?) Adobe and HP software - OS X (which actually prevents changing the DPI in the first place leaving you with ridiculous font sizes) ... so, pretty much everything, then. Can we please move on? Thanks. ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
microcai wrote: They can't care how big a windows is in the pixel, but in the inch. People should have different monitors with different DPI. Windows should stay same size regardless the DPI. Force DPI==96 on every monitor is a stupid idea, and we should avoid it on the protocol side. The reason this had to be done was due to the incredibly stupid idea that only *fonts* are measured in points, and every other graphic is measured in pixels. This strange idea was on both X and Windows, likely due to the initial programs being terminal emulators where there was no graphics other than text. What this really means is that there are two different coordinate systems for all the graphics, and programmers just assumed these two systems always lined up exactly like they did on their screen. After a lot of awful looking output on screens with different DPI, both Windows and then X resorted to just forcing the DPI to 96, thus making the systems obey the programmer's assumptions. Bad DPI settings are still a bug on X, producing ridiculous large and tiny font sizes unexpectedly, and this is NEVER wanted. The correct solution would have been to specify all coordinates in the same units, likely 1 unit in the CTM. For practical reasons on current-day screens this wants to be a pixel by default, but there is no reason a program can't read the DPI and set the CTM to draw actual-size graphics. I suggest, DPI should also be windows specific, so that compositor can *scale it*. If I understand it right, a Wayland window has both a rectangle measured in screen coordinates, and a source image that can be a different size. The compositor is expected to transform the source image (scale it) to fit in the rectangle. ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
On 12 May 2011 19:47, Bill Spitzak spit...@gmail.com wrote: microcai wrote: They can't care how big a windows is in the pixel, but in the inch. People should have different monitors with different DPI. Windows should stay same size regardless the DPI. Force DPI==96 on every monitor is a stupid idea, and we should avoid it on the protocol side. The reason this had to be done was due to the incredibly stupid idea that only *fonts* are measured in points, and every other graphic is measured in pixels. This strange idea was on both X and Windows, likely due to the initial programs being terminal emulators where there was no graphics other than text. What this really means is that there are two different coordinate systems for all the graphics, and programmers just assumed these two systems always lined up exactly like they did on their screen. After a lot of awful looking output on screens with different DPI, both That's not really true. Of course, there are things that look awful in different DPI (or because you happen to have slightly different fonts than the author) because they were done by braindead people. This includes but is not limited to - many web sites - (some?) Adobe and HP software - OS X (which actually prevents changing the DPI in the first place leaving you with ridiculous font sizes) Note that very first UIs were virtually bitmap-free and all the WM buttons and borders were vector graphics or generated on the spot from a few user-specified parameters (Windows 3.1, old stuff like mwm, olwm, fvwm, ..) and could be scaled to any size you specified. Then bitmaps were used heavily and made their way to stuff like window borders because the level of complexity people desired for their eye-candy could not be done with simple vector graphics anymore, and complex vector graphics required more power than people were willing to sacrifice for window borders. Still GTK bitmap themes have provisions for scaling the bitmaps to suit any text sizes in window captions and buttons. The button border will be relatively thinner to the text size (or thicker for smaller text) but will still render as intended, and people are free to choose a different theme. Similarly in Windows you can set different border sizes or font sizes if you accept that tons of braindead software breaks (eg. Adobe CS or HP scanner dialogs). Also Windows bitmapped window buttons look terribly on non-default sized borders but vector buttons are still available. The web is a problem because due to the specs being how they are they are not really friendly to people conscious about the look of their sites and many effects can't be achieved in a portable way without setting the element sizes exactly in pixels. You can say it's a defect in the specs or an error on the side of the people who are trying to stretch them to make their sites look flashy at the expense of usability but it's totally offtopic here. Windows and then X resorted to just forcing the DPI to 96, thus making the systems obey the programmer's assumptions. Bad DPI settings are still a bug on X, producing ridiculous large and tiny font sizes unexpectedly, and this is NEVER wanted. The correct solution would have been to specify all coordinates in the same units, likely 1 unit in the CTM. For practical reasons on current-day screens this wants to be a pixel by default, but there is no reason a program can't read the DPI and set the CTM to draw actual-size graphics. Well, they can't on systems where DPI is always forced to be 96 regardless of the actual screen physical properties. Also this is reportedly[1] done so that people don't get ridiculously small text on TVs but it is at the expense of getting ridiculously small DPI on most netbooks and high-end notebooks so this is not really a good tradeoff IMHO. Thanks Michal [1] https://bugs.freedesktop.org/show_bug.cgi?id=23705 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
mccrocai wrote: That's not true. DPI is not only used by font size, but also by image size and ther things You don't want you 300DPI screen display *tiny tiny font*, will you? By designing the protocol *DPI aware*, and force the application deal with the DPI natively, we get better user experience. I think I didn't explain the problem right. I agree that it would be nice if programs were DPI-aware. The problem is that the idiots doing both X and windows built in DPI-awareness to only *PART* of the graphics api. Font sizes were chosen in points. EVERY OTHER GRAPHIC was measured in pixels. A graphics api where everything is measured in points (ie paying attention to the DPI) would make sense. One where everything is measured in pixels would also make sense. But this combination is a stupid idea and we are paying for it today with the inability to scale graphics. ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
On 10 May 2011 05:46, Russell Shaw rjs...@netspace.net.au wrote: On 10/05/11 07:29, Daniel wrote: El dg 08 de 05 de 2011 a les 09:47 -0700, en/na Bill Spitzak va escriure: Though it is possible, I don't like the idea of clients sending hints about what areas are the close box or window border, since it implies there are such concepts as title bar and close box. The compositor can just have clicks anywhere raise and move the non-responsive window, and lots of clicks (indicating user frustration) pop up a box offering to kill the program. On Linux, since it is standard, compositors can also have Alt+click always raise/move windows, and alt +right click pop up a menu of compositor-side window actions. This would be actually a good way to handle it. Use an special mode or tool, a la xkill, to deal with stuck applications. It can take the form of an special key/mouse combination, gestures, or as I said before, an external tool like xkill. Note that it needs not be limited to killing, but could do any other thing, like minimizing, sending to another virtual desktop, etc. Keeping track of dead clients could be done like this: A client program opens a socket connection to the window server, and the window server determines the PID of the client via a means that the client has no control over (some kind of kernel call that can determine the client using that socket). The client also sends the window server the title bar area that contains the maximize/minimize/close buttons. All clients must handle an is_alive probe event from the window server at any time, replying with something unspecified to confirm it is not dead. Whenever the mouse is clicked in the title bar, the window server can expect the client to send it an is_alive notification within say 1 second. If it doesn't, the window server can send the client an is_alive probe event. If there's no response after a certain time, the window server can kill the client. Alternatively, it could pop up a gui task manager window for the user to manually kill stuff. Clearly it's up to the user to decide if an application is stuck or not. The is_alive request may look like a nice idea at the first glance but it is not very reliable. How long timeout is allowed before the application is marked 'unresponsive'? This is clearly application and system specific. Any timeout based protocol is inherently unreliable. The application may have a separate thread to fulfill this is_alive requirement and the rest may still be stuck. The application may be running but in undesirable state which is not something the compositor can decide. An utility like xkill resolves all of the above. You don't like the application so you get rid of it. The compositor can resize or hide the application window at any time without any cooperation from the application. The application may publish hints as to how it wants the window content treated when it does not match the size of the displayed window and the compositor may use these to present the window in a reasonable way until the application resizes the content. This requires that the compositor notifies the application when the window is resized. Thanks Michal ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
On 11/05/11 18:55, Michal Suchanek wrote: On 10 May 2011 05:46, Russell Shawrjs...@netspace.net.au wrote: On 10/05/11 07:29, Daniel wrote: El dg 08 de 05 de 2011 a les 09:47 -0700, en/na Bill Spitzak va escriure: Though it is possible, I don't like the idea of clients sending hints about what areas are the close box or window border, since it implies there are such concepts as title bar and close box. The compositor can just have clicks anywhere raise and move the non-responsive window, and lots of clicks (indicating user frustration) pop up a box offering to kill the program. On Linux, since it is standard, compositors can also have Alt+click always raise/move windows, and alt +right click pop up a menu of compositor-side window actions. This would be actually a good way to handle it. Use an special mode or tool, a la xkill, to deal with stuck applications. It can take the form of an special key/mouse combination, gestures, or as I said before, an external tool like xkill. Note that it needs not be limited to killing, but could do any other thing, like minimizing, sending to another virtual desktop, etc. Keeping track of dead clients could be done like this: A client program opens a socket connection to the window server, and the window server determines the PID of the client via a means that the client has no control over (some kind of kernel call that can determine the client using that socket). The client also sends the window server the title bar area that contains the maximize/minimize/close buttons. All clients must handle an is_alive probe event from the window server at any time, replying with something unspecified to confirm it is not dead. Whenever the mouse is clicked in the title bar, the window server can expect the client to send it an is_alive notification within say 1 second. If it doesn't, the window server can send the client an is_alive probe event. If there's no response after a certain time, the window server can kill the client. Alternatively, it could pop up a gui task manager window for the user to manually kill stuff. Clearly it's up to the user to decide if an application is stuck or not. The is_alive request may look like a nice idea at the first glance but it is not very reliable. How long timeout is allowed before the application is marked 'unresponsive'? This is clearly application and system specific. Any timeout based protocol is inherently unreliable. In X, dragging or resizing a window is instantaneous. The proposed scheme was to allow a 1000 millisecond delay before assuming the client was stuck. It was assumed the user could also bring up a task manager with crtl-alt-delete and kill a client manually if needed. The application may have a separate thread to fulfill this is_alive requirement and the rest may still be stuck. The application may be running but in undesirable state which is not something the compositor can decide. An utility like xkill resolves all of the above. You don't like the application so you get rid of it. The compositor can resize or hide the application window at any time without any cooperation from the application. The application may publish hints as to how it wants the window content treated when it does not match the size of the displayed window and the compositor may use these to present the window in a reasonable way until the application resizes the content. This requires that the compositor notifies the application when the window is resized. ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
Michal Suchanek wrote: I guess there is one thing that can be done. The compositor could publish a hint to the application that it takes care of decorating the windows (even if it is a tiling WM and in fact does not but the user does not want any decorations in the first place) Indeed this looks like a good idea. In fact doing some sketches it appears to be necessary for the compositor to tell the client to delete the decorations on each edge independently. and the client could publish a hint that it does draw decorations and its windows should not be decorated by the compositor (or it does not want decorations because it is a clock window and decorating it makes no sense). I don't think the compositor should ever decorate the windows so I very much disagree with any idea like this. It cannot draw into the texture for the window, as that memory belongs to the client. If the client is doing internal double-buffering, the compositor does not even have a pointer to the texture! Therefore the compositor would have to add extra surfaces that are the decorations. This could either be a larger underlay window, an overlay with a big transparent hole, or thin windows placed around the edges. The problem here is that resizing the window needs to be an atomic operation so the user never sees a partial update. This means that both windows must resize and have their image replaced in the same operation, while the images are produced by two different processes! This sounds very complex and difficult. When you add to this the insane amount of little details that clients need to send to control the decorations (such as whether there should be a resize box, etc) I think it is nonsense to ever consider such things. ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
I personally does support and only support client side decoration. Move and resize ? Better be done in the server side. Average application should never care about where its windows is. The compositor cares and move them without notify the client. If the unusual application does care where its windows is , go and ask the compositor. And how big? They can't care how big a windows is in the pixel, but in the inch. People should have different monitors with different DPI. Windows should stay same size regardless the DPI. Force DPI==96 on every monitor is a stupid idea, and we should avoid it on the protocol side. I suggest, DPI should also be windows specific, so that compositor can *scale it*. signature.asc Description: OpenPGP digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
I can't get one thing out of this discussion. So you are arguing about client side VS server side decorations, handling of moves/resizes, maybe even buttons scroll bars etc. But all wayland does is provide a communication channel that enables clients to draw in the GPU memory, and then compositors display this memory the way they want to on screen. So, in my understanding there can be compositors drawing stuff around the windows (because they have all screen's content and they can mix it in whatever way they want), handle common shortcuts for close, move etc. And there can be other compositors that don't do anything like that. And both of these will be wayland compositors. Or are you actually arguing to put some additional stuff to the wl protocol that will enable more compositor side actions (what is X currently doing)? And why is everybody talking about titlebars and close buttons? I think this is also part of the brain-damage, that years of using windows and mac has brought us. I'm using a tiling window manager, and I really can't understand why would anybody want titlebars buttons on them, unless he/she really enjoys spending half of the time moving windows around so he can see them (if they wobble it is so much fun, I agree). And how do the tiling WMs in X fit the client vs server discussion. If it was all client side I assume no one cares about tiling windows anymore (no application developer), so simply there would be no tiling at all? There are things that should be common for all windows. Like closing, moving, resizing. Of course, because I'm using tiling window manager, this is all done through kb shortcuts, implemented in the server (I'm not sure if this fits the client vs server discussion, because this does not involve drawing decorations but certainly puts some overhead in the server to manage windows). I cant imagine anybody using his computer if these operations, are done through GUI and are done differently depending on the window. Of course this can be solved outside wayland by making GTK+, Qt more alike or creating additional communication channels between the clients and the servers. But this then tends to another discussion we had about screen locking, security, and vnc :) which was basically weather wl should make the protocol handle these things, or hardcode the strange parts (like a locking app) inside the compositor and use dbus or similar to link client and server for those out-of-core-wayland issues. (The discussion led to nowhere, as this one is also headed to). So what are you actually arguing about :) I mean -- just both sides explain in more detail what they want implemented where (in client, in server, in 3rd party), because otherwise it is going nowhere. Cheers, Iskren ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
El dg 08 de 05 de 2011 a les 09:47 -0700, en/na Bill Spitzak va escriure: Though it is possible, I don't like the idea of clients sending hints about what areas are the close box or window border, since it implies there are such concepts as title bar and close box. The compositor can just have clicks anywhere raise and move the non-responsive window, and lots of clicks (indicating user frustration) pop up a box offering to kill the program. On Linux, since it is standard, compositors can also have Alt+click always raise/move windows, and alt +right click pop up a menu of compositor-side window actions. This would be actually a good way to handle it. Use an special mode or tool, a la xkill, to deal with stuck applications. It can take the form of an special key/mouse combination, gestures, or as I said before, an external tool like xkill. Note that it needs not be limited to killing, but could do any other thing, like minimizing, sending to another virtual desktop, etc. ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
On Sat, May 7, 2011 at 12:52 PM, microcai micro...@fedoraproject.orgwrote: 于 2011年05月08日 00:30, Mike Paquette 写道: On May 7, 2011, at 8:40 AM, microcai wrote: I know some basic theory of compositor. But I still have concern about client window decorations. I think it is very likely an application becomes unresponsive during resizing. Or a user tires to resize a unresponsive window. In that case, I don't know if compositor can draw an updated title bar or just stretch the outdated window context to the new size. At same time how the compositor calculate rectangles' size and position for title bar and buttons? Peng Like I said, the compositor can call the client unconditional via signal. No matter it is live or dead lock. I'm not entirely sure this is a workable idea. Signals are not a reliable inter-process communications mechanism. There are also limits as to what state can be safely modified from within a signal handler. Non-async-signal-safe functions cannot be invoked from a signal handler. That would include functions that alter graphics state. A normal thread of execution within a client may not be coded to anticipate asynchronous modification of the current graphics state. The use of a lock to guard the graphics state is insufficient here. If the graphics state is guarded by a lock, common when multiple asynchronous threads are sharing a graphics state, then the signal handler must also honor that lock. This can lead to a contention problem should the signal handler be invoked on the thread already holding the lock. An application becoming unresponsive during app window resizing is an application design problem, and is best addressed at the application level, not as pat of the window server and compositor design. The window server design should provide mechanisms, but strive to be as free of policy as possible. Usability issues such as an unresponsive application are better handled as part of the user interface policy mechanisms, implemented as part of the toolkits and desktop management logic. The window server can provide the mechanisms to move, hide, show, and resize windows. Decisions as to how to handle unresponsive applications and present UI regarding these applications is best done at a higher level. Mike Paquette Just notify the client if it's alive. But if the client is sure to be dead locking in some place (by checking the waiting channel of the client), call it via signal. Since win2k.sys is in the kernel, so windows really does this logic. But, if wayland is going to use client-side decoration, then we should think more carefully, because we got zero help from the kernel side. Even so , client side decoration is still better than server side. Peng, client side decoration != client side window management. Sorry. I don't understand how to use signals to resolve those kind of problems. When an application is locked, it is very likely with memory corruption too. I think libwayland should be a user space library. Its memory is not protected system, and it may be corrupted too. To resolve this problem, you have to find a way to protect the memory used by wayland library. As I know, only two solutions, putting code in kernel or in a separated process. Peng ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
2011/5/6 Kristian Høgsberg k...@bitplanet.net On Fri, May 6, 2011 at 2:50 PM, Peng Huang shawn.p.hu...@gmail.com wrote: I still remember some old windows systems which use client side decoration. When applications have some problems, you can not use close button to close them. Any the whole decoration will not be repainted anymore, just leave users the background color. That is a really bad UX. I think server side decoration is a better solution. At same time, wayland should allow an application to disable it, and draw its decoration by self. Peng Listen, this is not OK. You're welcome to contribute to the discussion, but I ask that you at least read the other emails in the thread. I'm not asking you to go read documentation or even code, just fucking read what other people have already suggested in the thread, before blabbering out with your preconceived notion of what client side decorations might be. You obviously haven't read the previous mails in this thread or even understand just the basics about how Wayland works. You're replying with a sad anecdote about how you once used a windows system and couldn't close the window and the application didn't repaint. I'm sure that was traumatizing, but it's not relevant to this discussion. You're not helping anybody here, you're just spreading misinformation. I could suggest that you go back and read my suggestions, but that's probably too much too ask, so I'll repeat them here: - the client can specify a rectangle (typically the title bar) where the should interpret click-and-drag as a window move operation. This lets the compositor move unresponsive windows around and is similar to what Mike Paquette described. - the client can specify another kind of rectangle (typically the close button), where the compositor should expect a certain response (window going away, for example) within a few seconds or so. This will let the compositor pop up a Window didn't respond, force quit? dialog either immediately or on the second click attempt. - unresponsive windows wont go blank, the compositor has the contents of the window and can repaint from that. The window contents will stop updating, but the compositor doesn't rely on the apps being responsive to repaint the screen. This is a key feature of composited window systems. I am sorry if I said something wrong. I know some basic theory of compositor. But I still have concern about client window decorations. I think it is very likely an application becomes unresponsive during resizing. Or a user tires to resize a unresponsive window. In that case, I don't know if compositor can draw an updated title bar or just stretch the outdated window context to the new size. At same time how the compositor calculate rectangles' size and position for title bar and buttons? Peng This was a flame. I don't do that often, but I'm fed up with all the uninformed me-too that always happens in all the client-side-decoration threads. Have a good weekend, Kristian On Fri, May 6, 2011 at 1:32 PM, Bill Spitzak spit...@gmail.com wrote: Sam Spilsbury wrote: Actually, I'm pretty sure in 99% of the cases out there the amount of code required for individual applications to have a window border using decorations done on the window manager side is going to be pretty much nil. Size? Resize rules? Name? Icon name? Icon? Layer? Window group? Parent Window? Window role? Desktop? Hardly nil. Take a look at how many pages of stuff is in the freedesktop.org window manager hints. I really don't think this is an issue to do with client side decorations. If the window management policy can't handle the Gimp case correctly, then we need to revise our window management policy, where of course I'm open to ideas here. Window management policy should also be client-side. I may not have been clear about that. The wayland compositer almost NEVER moves or raises or resizes a window. Clients do this in response to clicks or whatever. This would have made it TRIVIAL to implement Gimp the way they intended, as at no time would an image window raise above their toolbars, since they control both of them. I think it is disgusting that for 30 years now we have been forced to not use overlapping windows, primarily due to the idiotic idea that the system should implement click to top (especially idiotic because of the incredible triviality of making the client do that). Every major application (including Gimp...) has been forced to use a single window with a tiled interior, and perhaps some pop-up child windows, because of this bug and am really really hoping Wayland will finally fix it. To handle locked windows the compositor certainly can move, raise, lower and unmap them. It can do this if the user holds down certain keys, or if it detects the application is locked up, or if the user picks menu items. On
Re: client side decorations
On 6 May 2011 02:10, Kristian Høgsberg k...@bitplanet.net wrote: I can't remember when I last had to deal with an unresponsive application I had this happen to me in Windows XP yesterday. To be fair, I was pushing the machine by running two VMs, one of which was running Windows update. Chrome may have been paged out. When I clicked in it it didn't respond, and when I tried to minimize it that locked up window operations in the whole desktop. Nothing responded to clicks and I couldn't switch active windows. After about a minute it came back into life. Probably when things had gotten paged back in. It's not a nice situation. I see badly behaved apps often in Linux as well. I think its important that you can switch active windows and move other windows on top of unresponsive ones, so that you can say start a process monitor and kill it. It's also nice if you can move, minimize and kill them. Client side decorations have many benefits, so maybe just have some special hotels or similar for this. ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
On 6 May 2011 08:25, Niklas Höglund nhogl...@gmail.com wrote: so maybe just have some special hotels or similar for this. Annoying text prediction. Hotkeys, not hotels. ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
On 06/05/11 10:18, Bill Spitzak wrote: I believe client-side decorations are an absolute must. The amount of code necessary for an application to use an async protocol to describe how the window border should appear is greatly larger than that needed to just draw and handle events in the window border itself. In FLTK I would estimate the ICCCM code for the window object is about 5 times larger than the code for an otherwise similar MDI-like frame where FLTK draws everything. Handling resize and other events cleanly is a real mess, too, due to the async nature of them. Also such designs lock the user interface ideas into whatever existed at that time, an excellent example is Gimp's being forced to give up any attempt to make multiple windows because of window managers failing to implement the many controls it would need. ... Any program could manage the internals of their own desktop window, acting like a sub window manager for other windows belonging to that program. ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
On 06/05/11 10:18, Bill Spitzak wrote: I believe client-side decorations are an absolute must. The amount of code necessary for an application to use an async protocol to describe how the window border should appear is greatly larger than that needed to just draw and handle events in the window border itself. In FLTK I would estimate the ICCCM code for the window object is about 5 times larger than the code for an otherwise similar MDI-like frame where FLTK draws everything. Handling resize and other events cleanly is a real mess, too, due to the async nature of them. Also such designs lock the user interface ideas into whatever existed at that time, an excellent example is Gimp's being forced to give up any attempt to make multiple windows because of window managers failing to implement the many controls it would need. ... Any program could manage the internals of their own desktop window, acting like a sub window manager for other windows belonging to that program. The program would need to draw its own maximize/minimize/close buttons. ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
On Fri, May 6, 2011 at 8:18 AM, Bill Spitzak spit...@gmail.com wrote: I believe client-side decorations are an absolute must. The amount of code necessary for an application to use an async protocol to describe how the window border should appear is greatly larger than that needed to just draw and handle events in the window border itself. In FLTK I would estimate the ICCCM code for the window object is about 5 times larger than the code for an otherwise similar MDI-like frame where FLTK draws everything. Handling resize and other events cleanly is a real mess, too, due to the async nature of them. Actually, I'm pretty sure in 99% of the cases out there the amount of code required for individual applications to have a window border using decorations done on the window manager side is going to be pretty much nil. What we currently have is a situation where applications are re-parented at an offset into frame windows (which is a good idea for a number of other window management policy reasons) and all those applications ever need to care about is drawing their content. With the solution I proposed, we're going to have the situation where either (a) windows don't claim to support the window manager drawing their background, so we just revert to the old behaviour of re-parenting the application in at an offset to make room for the decoration or (b) the application claims to support the specification, and does NOT draw it's background (only widgets on a transparent surface), specifies either a background pixmap or uses the default and gets reparented into the frame window at 0x0 so it can draw whatever it wants in the titlebar area. I really don't think lines of code is a fair comparison here, especially for ICCCM window objects since this specification handles a lot more than just decorations (it also handles a lot of the client-to-window manager communication, which are really just work-a-rounds for broken design in X). I would imagine that in most cases, most clients are only going to want a simple decoration, consistent with everything else to provide a close, minimize and maximize button and then call it a day. It's only in extremely rare cases where we have clients the try to differentiate themselves by optimizing the chrome in ways that they think fits the UX. And even in this case, I believe it is the role of the window manager to confine how much this should be done and how much consistency there is for the user. Sure, chromium is easy to use these days because the chromium developers are interested in ensuring that there is consistency in their application. However, there are still applications which present a broken user experience to the user (canonical example: windows media player), OR there are times when the window manager wishes to change policy on how things are positioned (eg, the famous buttons on the left case) and then we need to wait on every single application to play catch-up to be consistent. Even if we had a separate library to describe and even draw the decorations, there is no way that we can enforce applications to use this library, and the chances are that there are going to be popular applications that will *not* use this library. Also such designs lock the user interface ideas into whatever existed at that time, an excellent example is Gimp's being forced to give up any attempt to make multiple windows because of window managers failing to implement the many controls it would need. Whether Gimp's idea is right or wrong, it would have been trivial to implement it if Gimp itself could control the appearance and raising and mapping of windows without the window manager messing with it. I really don't think this is an issue to do with client side decorations. If the window management policy can't handle the Gimp case correctly, then we need to revise our window management policy, where of course I'm open to ideas here. Attempts to make this api expandable makes things worse. On Windows it is possible to add some icons to them, and programs are doing so, but those icons are not obeying the style at all, and are making assumptions about the dimensions and colors of what is there, so the end result is that it is *less* possible to customize the window border appearance. On windows all we see is that applications can draw widgets inside the existing window border style. This works well in every case I've seen it - chromium, firefox, office, you name it. As for making them all look alike, this can and should be solved by whatever mechanism is used to make the buttons and scroll bars inside applications look alike. An appearance library that reads user configuration and has calls to draw buttons, window borders, etc, would work for this. Obviously the api complexity and inability to innovate problems would be there but at least they would synchronous! Also there would be many levels of access, allowing new api ideas to be implemented. We still have
Re: client side decorations
On 6 May 2011 09:42, Sam Spilsbury smspil...@gmail.com wrote: You cannot assume that there will be a universally adopted method to styling because we see on every single platform that there will *not* be one. The best way to enforce styling is to enforce it at the window manager level, so that the applications on the system actually obey what the user wants them to do, not some crazy idea that the application developer had. Isn't the point of free software that we allow people to do what they want? Yes, some application might do something you really don't agree with, but you don't need to use that application. -- Niklas ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
Sam Spilsbury wrote: Actually, I'm pretty sure in 99% of the cases out there the amount of code required for individual applications to have a window border using decorations done on the window manager side is going to be pretty much nil. Size? Resize rules? Name? Icon name? Icon? Layer? Window group? Parent Window? Window role? Desktop? Hardly nil. Take a look at how many pages of stuff is in the freedesktop.org window manager hints. I really don't think this is an issue to do with client side decorations. If the window management policy can't handle the Gimp case correctly, then we need to revise our window management policy, where of course I'm open to ideas here. Window management policy should also be client-side. I may not have been clear about that. The wayland compositer almost NEVER moves or raises or resizes a window. Clients do this in response to clicks or whatever. This would have made it TRIVIAL to implement Gimp the way they intended, as at no time would an image window raise above their toolbars, since they control both of them. I think it is disgusting that for 30 years now we have been forced to not use overlapping windows, primarily due to the idiotic idea that the system should implement click to top (especially idiotic because of the incredible triviality of making the client do that). Every major application (including Gimp...) has been forced to use a single window with a tiled interior, and perhaps some pop-up child windows, because of this bug and am really really hoping Wayland will finally fix it. To handle locked windows the compositor certainly can move, raise, lower and unmap them. It can do this if the user holds down certain keys, or if it detects the application is locked up, or if the user picks menu items. On windows all we see is that applications can draw widgets inside the existing window border style. This works well in every case I've seen it - chromium, firefox, office, you name it. No on Windows an application can add drawings to the title bar. It is pretty clear that applications are assuming the default Vista colors and button sizes and layouts when making these drawings, thus defeating theming. We still have the problem of not having a universal toolkit to handle these things, and the reality of the matter is that a lot of proprietary applications are not going to want to use these toolkits. I have no idea why you think that making the window borders match is all that is needed. What about the buttons and menus and toolbars and scroll bars and how editing is done? If this is important I would much rather see a solution that addresses all of these, rather than somehow saying the window borders are special. You cannot assume that there will be a universally adopted method to styling because we see on every single platform that there will *not* be one. The best way to enforce styling is to enforce it at the window manager level, so that the applications on the system actually obey what the user wants them to do, not some crazy idea that the application developer had. And this is true on X and Windows today. People bypass the system and draw their own window borders. And the result is far worse than if the system was designed for this from the start. Lets not repeat these mistakes. ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
I still remember some old windows systems which use client side decoration. When applications have some problems, you can not use close button to close them. Any the whole decoration will not be repainted anymore, just leave users the background color. That is a really bad UX. I think server side decoration is a better solution. At same time, wayland should allow an application to disable it, and draw its decoration by self. Peng On Fri, May 6, 2011 at 1:32 PM, Bill Spitzak spit...@gmail.com wrote: Sam Spilsbury wrote: Actually, I'm pretty sure in 99% of the cases out there the amount of code required for individual applications to have a window border using decorations done on the window manager side is going to be pretty much nil. Size? Resize rules? Name? Icon name? Icon? Layer? Window group? Parent Window? Window role? Desktop? Hardly nil. Take a look at how many pages of stuff is in the freedesktop.org window manager hints. I really don't think this is an issue to do with client side decorations. If the window management policy can't handle the Gimp case correctly, then we need to revise our window management policy, where of course I'm open to ideas here. Window management policy should also be client-side. I may not have been clear about that. The wayland compositer almost NEVER moves or raises or resizes a window. Clients do this in response to clicks or whatever. This would have made it TRIVIAL to implement Gimp the way they intended, as at no time would an image window raise above their toolbars, since they control both of them. I think it is disgusting that for 30 years now we have been forced to not use overlapping windows, primarily due to the idiotic idea that the system should implement click to top (especially idiotic because of the incredible triviality of making the client do that). Every major application (including Gimp...) has been forced to use a single window with a tiled interior, and perhaps some pop-up child windows, because of this bug and am really really hoping Wayland will finally fix it. To handle locked windows the compositor certainly can move, raise, lower and unmap them. It can do this if the user holds down certain keys, or if it detects the application is locked up, or if the user picks menu items. On windows all we see is that applications can draw widgets inside the existing window border style. This works well in every case I've seen it - chromium, firefox, office, you name it. No on Windows an application can add drawings to the title bar. It is pretty clear that applications are assuming the default Vista colors and button sizes and layouts when making these drawings, thus defeating theming. We still have the problem of not having a universal toolkit to handle these things, and the reality of the matter is that a lot of proprietary applications are not going to want to use these toolkits. I have no idea why you think that making the window borders match is all that is needed. What about the buttons and menus and toolbars and scroll bars and how editing is done? If this is important I would much rather see a solution that addresses all of these, rather than somehow saying the window borders are special. You cannot assume that there will be a universally adopted method to styling because we see on every single platform that there will *not* be one. The best way to enforce styling is to enforce it at the window manager level, so that the applications on the system actually obey what the user wants them to do, not some crazy idea that the application developer had. And this is true on X and Windows today. People bypass the system and draw their own window borders. And the result is far worse than if the system was designed for this from the start. Lets not repeat these mistakes. ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: client side decorations
Window management policy should also be client-side. I may not have been clear about that. The wayland compositer almost NEVER moves or raises or resizes a window. Clients do this in response to clicks or whatever. This would have made it TRIVIAL to implement Gimp the way they intended, as at no time would an image window raise above their toolbars, since they control both of them. I wouldn't use wayland if thats the case, the kind of security risk this creates is massive. you could have clients that refuse to cooerate and always take up the entire screen, or worse, rendering your computer useless. also I never like muti window apps like the gimp, or openoffice. they draw your attention away from what your doing to rearrange these little windows, and what ever you do don't close them or would could spend the next hour trying to get them back. there sould always be central system for making windows behave or they won't ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel