1. 28 May, 2013 1 commit
  2. 27 May, 2013 3 commits
  3. 23 May, 2013 2 commits
  4. 21 May, 2013 1 commit
  5. 20 May, 2013 3 commits
  6. 15 May, 2013 6 commits
  7. 14 May, 2013 1 commit
  8. 11 May, 2013 3 commits
  9. 09 May, 2013 2 commits
  10. 08 May, 2013 1 commit
    • Alexander Larsson's avatar
      gdkwindow: Don't enforce a native window for a custom visual · 63a35b6f
      Alexander Larsson authored
      In the ancient X days you could have Xservers that had multiple active windows, like
      one truecolor and one 8bit palette. Then most apps ran in 8bpp but a single window
      would use truecolor. This is done by specifying different visuals for the windows.
      To make this work we ensured that a window with a visual different from its parent
      gets a native subwindow, so that X can tell the hardware to do its magic.
      These days the only real time we get two different visual is when one is a rgba visual
      and the other is not. So, the code to check this doesn't really do anything but
      get in the way when someone accidentally manages to not get a rgba visual on
      a child window (see bb7054b5). So, to avoid
      such errors we just remove the "different visual than parent" check.
  11. 07 May, 2013 17 commits
    • Rico Tzschichholz's avatar
      Remove abi checking scripts (2) · d08d7f2c
      Rico Tzschichholz authored
      In addition to 019ad964
    • Alexander Larsson's avatar
      gdkwindow: Expose all native windows · e90fab2b
      Alexander Larsson authored
      We need to send exposes for all native windows, even the ones
      without an exposure mask set, because otherwise non-native
      children of the native window with an exposure mask will
      not be drawn.
    • Alexander Larsson's avatar
      gdkwindow: Avoid some unnecessary typechecks · 36100051
      Alexander Larsson authored
      This removes the typechecks in GDK_WINDOW_TYPE and GDK_WINDOW_DESTROYED. These
      are only used internally in gdkwindow.c and gdkdisplay.c anyway,  and these
      functions check for typesafety of arguments on function entry.
    • Alexander Larsson's avatar
      Add gdk_window_get_children_with_user_data · adffcf8a
      Alexander Larsson authored
      This function returns all the children that has a specific user_data set.
      This is used a lot in the new GtkWidget drawing code and doing
      it this way is faster than getting every child and calling get_user_data
      on each (which was a non-neglible part of the profiles). Additionally it
      also allows use to use some kind of hashtable to make this operation even
      faster if needed in the future.
    • Alexander Larsson's avatar
      Add gdk_window_set_invalidate_handler · e13fb1d3
      Alexander Larsson authored
      This lets you register callbacks for when child widgets invalidate
      areas of the window read it and/or change it.
      For instance, this lets you do rendering effects and keeping offscreen
      caches uptodate.
    • Alexander Larsson's avatar
      wayland: Don't use double buffers for wayland when not needed · 590366f0
      Alexander Larsson authored
      If we got the release event for the last buffer then we're
      fine with writing directly to the window surface, as wayland
      will not be looing at it. This saves us from allocating
      and copying more data.
    • Alexander Larsson's avatar
      gdkwindow: Make GdkPaintable normal GdkWindowImpl vfuncs · 61159611
      Alexander Larsson authored
      There is no need for this to be a separate interface, its just looking
    • Alexander Larsson's avatar
      gdkwindow: Change how paints work · e09b4fa0
      Alexander Larsson authored
      First of all, we now only do paints on native windows, as there is
      really no reason anymore to do it for subwindows. Secondly, we
      keep track of the paints even for GtkPaintable windows, but for
      that case we don't create the offscreen surface, but rather
      assume the windowing system does the backing store.
    • Alexander Larsson's avatar
      gdkframeclock: Loop the layout phase if needed · c3bff30b
      Alexander Larsson authored
      In the case where the layout phase queued a layout we don't
      want to progress to the paint phase with invalid allocations, so
      we loop the layout. This shouldn't normally happen, but it may
      happen in some edge cases like if user/wm resizes clash with
      natural window size changes from a gtk widget. This should not
      generally loop though, so we detect this after 4 cycles and
      print a warning.
      This was detected because of an issue in GtkWindow where it
      seems to incorrectly handle the case of a user interactive resize.
      It seems gtk_window_move_resize() believes that configure_request_size_changed
      changed due to hitting some corner case so it calls
      gtk_widget_queue_resize_no_redraw(), marking the window as need_alloc
      after the layout phase. This commit fixes the issue, but we should
      also look into if we can fix that.
    • Alexander Larsson's avatar
      gdkwindow: Simplify invalidation · e0ca53ff
      Alexander Larsson authored
      Now that all windows are non-opaque we can simplify the invalidation
      a lot. There is no need to clip the invalidate area to child regions,
      because we will always redraw everything under all the children.
      We only have to handle native childen specially.
    • Alexander Larsson's avatar
      gdkwindow: Remove implicit paints · fe098281
      Alexander Larsson authored
      We now only do one expose event per native window, so there will
      only be one begin/end_paint() call. This means all the work with
      implicit paints to combine the paints on a single double buffer
      surface is unnecessary, so we can just delete it.
    • Alexander Larsson's avatar
      Only handle exposes on native window, propagate to children via draw() · d22fd722
      Alexander Larsson authored
      We now consider non-native windows non-opaque, which means any invalid
      area in a subwindow will also be invalid all the way up to the nearest
      native windows. We take advantage of this by ignoring all expose events
      on non-native windows (which typically means just the toplevel) and instead
      propagating down the draw() calls to children directly via
      This is nice as it means we always draw widgets the same way, and it
      will let us do some interesting ways in the future.
      We also clean up the GtkWidget opacity handling as we can now always
      rely on the draing happening via cairo.
      We can't really just draw by walking down the widget hierarchy, as
      this doesn't get the clipping right (so e.g. widgets doing cairo_paint
      may draw outside the expected gdkwindow subarea) nor does it let
      us paint window backgrounds.
      So, we now do multiple draws for each widget, once for each GdkWindow,
      although we still do it on the same base cairo_t that we get for the
      toplevel native window. The difference is only the clipping, the rendering
      order, and which other widgets we propagate into.
      We also collect all the windows of a widget so we can expose them inside
      the same opacity group if needed.
      NOTE: This change neuters gtk_widget_set_double_buffered for
      widgets without native windows. Its impossible to disable
      the double buffering in this model.
    • Alexander Larsson's avatar
      gdkwindow: Remove ancient USE_BACKING_STORE define · fc645f28
      Alexander Larsson authored
      This is always set anyway.
    • Alexander Larsson's avatar
      gdkwindow: Simplify clip region calculations · 1f986ff9
      Alexander Larsson authored
      Since we no longer make overlapping siblings affect clip_region we
      can further simplify the clip region calculation and updating.
    • Alexander Larsson's avatar
      gdkwindow: Simplify clip region handling · 5773cf23
      Alexander Larsson authored
      Since we dropped the move region optimization there is really no need
      to try carefully keep track of opaque non-overlapped regions, as we
      don't use this information to trigger the optimization anymore.
      So, by assuming that all windows are non-opaque we can vastly simplify
      the clip region stuff. First of all, we don't need clip_region_with_children,
      as each window will need to draw under all children anyway. Secondly, we
      don't remove overlapping sibling areas from clip_region, as these are
      all non-opaque anyway and we need to draw under them
      Finally, we don't need to track the layered region anymore as its
      essentially unused. The few times something like it is needed we can
      compute it explicitly.
      For the case of native children of widgets we may cause a repaint
      under native windows that are guaranteed to be opaque, but these
      will be clipped by the native child anyway.
    • Alexander Larsson's avatar
      gdkwindow: Remove translate vfunc · 19560bf0
      Alexander Larsson authored
      This is not used anymore
    • Alexander Larsson's avatar
      gdkwindow: Remove outstanding_moves stuff · da2a1eac
      Alexander Larsson authored
      Since we now never move regions directly on the window we can
      remove all the stuff that track outstanding moves and flushes then.