Status report for client-side-windows
- From: Alexander Larsson <alexl redhat com>
- To: gtk-devel-list gnome org
- Subject: Status report for client-side-windows
- Date: Tue, 02 Dec 2008 12:13:41 +0100
As discussed in last weeks meeting, here is a status report for the
client-side-windows branch[1] work:
All rendering (including clipping) to and management of client
side windows is done and (as far as i can see) working. I consider
that part more or less finished, but there could be bugs in it.
There is one weakness where clipping is not perfect: when rendering
via cairo the window is clipped by setting an initial clip region on
the cairo_t from gdk_cairo_create, but cairo_reset_clip() will undo
this clipping and allow you to overdraw other windows. However,
reset_clip is not a commonly used feature, and it could be fixed with
a simple cairo addition (cairo_surface_set_device_clip_path).
Update region handling has been modified so that invalid area is
tracked per native window. This means that in the typical case its
only tracked on the toplevel meaning we automatically never expose too
much. I've also added a feature called implicit paints which are used
when exposing such an invalid area that causes gdk to only need to
allocate one double buffer pixmap for the size of the invalid region
on the native window which is then also used when exposing
subwindows (assuming all exposed widgets are double buffered).
Also implemented is basic events, where all even masks are virtual and
we only get (all) native events on toplevel windows (none on child
windows), generating events on subwindows (native or client side) by
ourselves. Events generated atm are: motion events (real and on
grab/ungrab ), button events, enter/leave (real and due to geometry
change), map/unmap. Key events still work as they are never sent to
child windows in gdk anyway.
In addition to the client side window work there is support for
offscreen windows in the branch. These are windows created with type
GDK_WINDOW_OFFSCREEN. Such windows are basically toplevel windows that
are not tied to a specific root window and that render to a pixmap
that is automatically allocated (and resized when needed, etc). This
code mostly works as with the other offscreen branches although there
has been some minor regression where getting the mouse pointer
position can cause crashes.
Atm the offscreen window can be both child windows and toplevel
ones. If they are child windows they don't really render or affect the
parent they are in except they get events from it. However, this
doesn't really work out cleanly in the design, so the plan is to redo
this and only allow offscreen windows as "toplevels". Any widget
wishing to embedd offscreen widgets need to do the picking of child
items, proxying events and transforming coordinates itself. However,
all code that want to use this (clutter or canvas basically) requires
such code anyway (for other item types), so this is not a
problem. Note that just because the GdkWindow hieararchy is broken
doesn't necessarily mean the GtkWidget hierarchy is, so
gtk_widget_get_toplevel() could still work for transformed gtkwidgets
embedded in a gtk canvas widget.
Next on my list of things to do is to make sure native subwindows
work, by making them children of the nearest native window and using
the shaped window extension to clip them against the other
windows. This will be handled by a call something like
gdk_window_set_has_native (GdkWindow *window, gboolean has_native). I
will also automatically set this when apps call
gdk_x11_drawable_get_xid() to ensure backwards compatibility.
There are a bunch of features that still require implementations and a
set of known regressions that has to be fixed listed at:
http://live.gnome.org/GTK%2B/ClientSideWindows
I might have forgotten or missed stuff, so it may not be complete.
I've mainly tested the test apps (gtk-demo, testgtk, etc) that ship
with gtk+ so far. When that is "finished" we need to start testing
this with real apps. I'm sure we'll find more things to fix then.
[1] availible at
http://git.testbit.eu/Gtk-shallow/log/?h=client-side-windows
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]