1. 11 Feb, 2018 1 commit
  2. 22 Jan, 2018 1 commit
    • Daniel Boles's avatar
      Widget: Don’t call reset() on NULL EventController · b8e24304
      Daniel Boles authored
      GtkGesture is a GtkEventController. gtk_event_controller_dispose() calls
      _gtk_widget_remove_controller(). That NULLs the pointer-to-Controller in
      our EventControllerData but does not delete said ECData from our GList.
      Subsequently, if that same Widget gets unparent()ed, that method calls
      unset_state_flags(), which leads to doing reset_controllers() if we are
      insensitive. Now, unlike most most other loops over the GList of ECData,
      reset_controllers() does not skip nodes whose pointer-to-Controller is
      NULL. So, we call gtk_event_controller_reset(NULL) and get a CRITICAL.
      This surfaced in a gtkmm program. The Gesture is destroyed before the
      Widget. The Widget then gets dispose()d, which calls unparent()… boom.
      I didn’t find an MCVE yet but would hope this logic is correct anyway:
      The simplest fix is to make the loop in gtk_widget_reset_controllers()
      skip GList nodes with a NULL Controller pointer, like most other such
      loops, so we avoid passing the NULL to gtk_event_controller_reset().
      In other, live cases, _gtk_widget_run_controllers() loops over the GList
      and removes/frees nodes having NULL Controllers, so that should suffice.
      But this clearly was not getting a chance to happen in the failing case.
  3. 07 Jan, 2018 1 commit
  4. 17 Dec, 2017 2 commits
  5. 14 Dec, 2017 1 commit
  6. 10 Dec, 2017 1 commit
    • Timm Bäder's avatar
      css: Replace _AFFECTS_TEXT with _TEXT_SIZE and _TEXT_CLIP · 492469a9
      Timm Bäder authored
      It was used to mark css properties that affect widgets with text, but it
      caused unnecessary invalidations. E.g. 'color' was marked as
      AFFECTS_TEXT but changing just the color of a label should not
      automatically queue a resize, which is what the code in
      gtk_widget_real_style_updated does.
      Replace this flag with GTK_CSS_AFFECTS_TEXT_SIZE and
      GTK_CSS_AFFECTS_TEXT_CLIP, which GtkWidget can use only if the widget
      actually has text.
  7. 22 Nov, 2017 1 commit
  8. 28 Oct, 2017 1 commit
  9. 19 Oct, 2017 1 commit
    • Carlos Garnacho's avatar
      gtkwidget: Emulate motion before button press on fallback touch handler · 9b874a40
      Carlos Garnacho authored
      The code has been shuffled so GDK_TOUCH_BEGIN results in a
      GDK_MOTION_NOTIFY to the new position and a GDK_BUTTON_PRESS on that same
      place. This makes pointer emulation consistent with what X11 does. Even
      though button presses have x/y arguments, there's code out there relying
      on getting prior motion events.
  10. 01 Oct, 2017 1 commit
  11. 15 Aug, 2017 1 commit
  12. 07 Aug, 2017 2 commits
  13. 03 Aug, 2017 1 commit
  14. 01 Aug, 2017 1 commit
  15. 22 May, 2017 2 commits
  16. 30 Mar, 2017 1 commit
  17. 22 Mar, 2017 1 commit
    • Timm Bäder's avatar
      widget: Prepend style classes to list when parsing · 92fd8cb8
      Timm Bäder authored
      Since the later gtk_style_context_add_class doesn't care about the order
      of the style classes, we can as well just prepend style classes to the
      list and avoid the squared behavior when appending to a linked list.
  18. 16 Feb, 2017 1 commit
  19. 15 Feb, 2017 1 commit
  20. 05 Nov, 2016 1 commit
  21. 21 Oct, 2016 1 commit
  22. 30 Sep, 2016 1 commit
  23. 22 Sep, 2016 1 commit
    • Timm Bäder's avatar
      widget: Don't print missing allocation warning by default · 54fdcb3f
      Timm Bäder authored
      This was meant to be silenced unless expicitly requested but
      G_ENABLE_DEBUG is defined by default unless --disable-debug is passed to
      configure, so use G_ENABLE_CONSISTENCY_CHECKS instead which is only
      defined if --enable-debug is explicitly passed.
  24. 15 Sep, 2016 1 commit
    • Emmanuele Bassi's avatar
      Ensure drawing context is set · bb705837
      Emmanuele Bassi authored
      If somebody decides to use gtk_widget_set_double_buffered() in the
      middle of a draw() then there's the risk of calling end_draw_frame()
      with an invalid pointer.
      Some overeager compilers may warn about the double_buffered bit field
      changing values and leading to a potentially uninitialized variable.
      In order to avoid compiler warnings or crashes, we can simply store the
      value of the double_buffered bit field at the beginning of the rendering
      and use that instead of the actual bit field.
  25. 14 Sep, 2016 1 commit
  26. 29 Aug, 2016 1 commit
  27. 23 Aug, 2016 1 commit
  28. 04 Aug, 2016 1 commit
  29. 25 Jul, 2016 3 commits
  30. 12 Jul, 2016 2 commits
  31. 27 Jun, 2016 1 commit
  32. 22 Jun, 2016 1 commit
    • Emmanuele Bassi's avatar
      gtk: Keep Firefox working in the DrawingContext world · 40ee61a6
      Emmanuele Bassi authored
      Firefox does a bunch of interesting things with GTK.
      If the top-level GtkWindow does not have a "csd" style class associated,
      Firefox will happily draw the contents of the container used to render
      HTML and XUL directly on the top level's GdkWindow; on the other hand,
      if a "csd" style class is found, the MozContainer will create a new
      child window, and draw on it.
      Then, Firefox will proceed to disable double buffering on both the
      top-level window and the MozContainer (unless they are backed by the
      same GdkWindow, in which case only the top-level will be
      single-buffered) *and* it will add a GDK_EXPOSURE_MASK flag to the
      MozContainer events for good measure (even if this is only needed for
      GTK+ 2.x).
      After landing the GdkDrawingContext API in GdkWindow, GTK enabled
      automatic double buffering on all top-level windows backed by a native
      surface, ad most users of single buffering rely on child widgets instead
      of top-levels, and we'd still like to have the same double buffering
      behaviour for all top-levels on all backends. Obviously, with Firefox
      disabling double buffering on the top-level window, the change broke
      their drawing mechanism.
      Ideally, Firefox could be fixed to not disable double buffering on the
      top-level window when MozContainer has a separate GdkWindow — i.e. the
      CSD case — but since we did introduce a slight change of behaviour in
      fringe users of the GTK+ API, let's keep backwards compatibility with
      the old code for a little while longer, and create an intermediate Cairo
      context unbound from the GdkDrawingContext, like we used to do until
      GTK+ 3.20.
  33. 10 Jun, 2016 1 commit
  34. 09 Jun, 2016 1 commit