[PATCH] Add configure option to disable scanner compilation which is helpful for cross-compilation
When cross-compiling Wayland, wayland-scanner should be picked up from the host system instead of compiling and trying to run e.g. ARM wayland-scanner on X86. This patch adds --disable-scanner option for disabling the scanner from the build and using existing wayland-scanner instead (from PATH) which should help in most cross-compilation systems. By default everything works as before. Signed-off-by: Jani Uusi-Rantala jani.uusi-rant...@nokia.com --- configure.ac|8 wayland/Makefile.am |8 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 34b8dbc..7dc8ccb 100644 --- a/configure.ac +++ b/configure.ac @@ -27,6 +27,14 @@ if test x$GCC = xyes; then fi AC_SUBST(GCC_CFLAGS) +AC_ARG_ENABLE([scanner], + [AC_HELP_STRING([--disable-scanner], + [Disable compilation of wayland-scannner])], + [], + [enable_scanner=yes]) + +AM_CONDITIONAL(ENABLE_SCANNER, test x$enable_scanner = xyes) + EXPAT_LIB= AC_ARG_WITH(expat, [ --with-expat=dir Use expat from here], [ expat=$withval diff --git a/wayland/Makefile.am b/wayland/Makefile.am index ed31dfc..fd79eb3 100644 --- a/wayland/Makefile.am +++ b/wayland/Makefile.am @@ -35,9 +35,16 @@ AM_CPPFLAGS = $(FFI_CFLAGS) AM_CFLAGS = $(GCC_CFLAGS) protocoldir = $(top_srcdir)/protocol + +if ENABLE_SCANNER wayland_scanner = $(top_builddir)/wayland/wayland-scanner +else +wayland_scanner = wayland-scanner +endif + include $(top_srcdir)/wayland/scanner.mk +if ENABLE_SCANNER bin_PROGRAMS = wayland-scanner wayland_scanner_SOURCES = \ @@ -46,6 +53,7 @@ wayland_scanner_SOURCES = \ wayland_scanner_LDADD = $(EXPAT_LIBS) libwayland-util.la $(BUILT_SOURCES) : wayland-scanner +endif BUILT_SOURCES =\ wayland-server-protocol.h \ -- 1.7.4.1 ___ 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 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