| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
| |
This signal is only set on GtkGesture objects, so check it's really there
before disconnecting.
|
|
|
|
|
|
|
|
| |
When setting the parent of a widget, queue_resize() on the widget will
be optimized away if the widget already had a resize queued.
Plus, we do not need to resize the widget as its size request is not
going to change.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes sure that hidden widgets always have priv->alloc_needed set
on them.
The constructor sets that flag, so we want to have it back when we
revert to this state.
This fixes GtkWindow skipping a size_allocate() when reshowing a
previously hidden window and thereby not updating its allocation and
clip. And that in turn would lead to draws not happening and us beig
left with a black window.
|
|
|
|
|
|
|
|
|
| |
There are currently three widget that implement such a property, and
there are other widgets for which the behavior can make sense. It
seems like a good time to add the property to GtkWidget itself so
subclasses can choose to respect it without adding their own property.
https://bugzilla.gnome.org/show_bug.cgi?id=757269
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mirror the behavior of gtk_widget_queue_resize() and always queue a
redraw. If we ever want to cause allocates without redraws we can add
gtk_widget_queue_allocate_no_redraw() then.
I had initially assumed gtk_widget_size_allocate() would take care of
queueing redraws, but it does not do that when neither size nor position
change. And that is obviously what's happening after
gtk_widget_queue_allocate().
Fixes buttons sometimes not redrawing (the record button in
widget-factory after locking it, all buttons when switching to the dark
theme).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When gtk_widget_show() or gtk_widget_hide() is called, don't queue a
resize on the widget itself but on the parent.
The widget itself may already be marked as in need of a resize and
the call would be optimized out and never reach the parent.
The parent size will change though because a child widget just changed
its visibility.
Fixes a bunch of issues with menus appearing black, toolbas not hiding
in widget-factory and also various reftests.
|
|
|
|
| |
Insteaad, introduce gtk_widget_needs_allocate() and use that.
|
|
|
|
|
| |
Do not queue a resize on the parent if the widget is not visible.
Invisible widgets do not influence the parents size.
|
|
|
|
|
|
|
|
| |
This commit toggles the big switch. We now don't run size_allocate()
from the toplevel up anymore in cases where we don't need to.
Things might be broken in subtle ways as a result of this commit. We'll
have to find them and fix them.
|
|
|
|
| |
This is not used so far.
|
|
|
|
| |
Turn it from a loop into tail-calling itself.
|
|
|
|
|
| |
There's no sizegroup specific code left in it, but lots of
widget-specifics.
|
|
|
|
|
|
|
|
| |
This happens way too much, so it's disabled unless GTK_DEBUG=geometry is
on.
Also, we can't detect it in the call to queue_resize() yet, only during
size_allocate(), so the warning comes after the signal emission.
|
|
|
|
|
| |
This catches the cases where widgets call gtk_widget_queue_resize()
in their size_allocate() callback.
|
|
|
|
|
|
| |
Widgets should have gtk_widget_get_preferred_width/height() called
on them before gtk_widget_size_allocate() gets called.
Add a check for this.
|
|
|
|
|
|
|
|
|
| |
... and API to set and unset it.
It is set when gtk_widget_queue_resize() is called.
It is unset when gtk_widget_get_preferred_width/height() is called.
So far it is not used.
|
|
|
|
| |
It's just shuffling code around.
|
|
|
|
| |
There's no need to queue a full resize there.
|
|
|
|
|
|
|
| |
This is so widgets can queue a rerun of their allocation logic, but
without triggering resizes everywhere.
For now, it just calls gtk_widget_queue_resize().
|
|
|
|
| |
See docs for what this is.
|
|
|
|
| |
They were only used with geometry widgets.
|
|
|
|
| |
The function was only used by the geometry widget.
|
|
|
|
|
|
|
|
| |
This changes widget paths for widgets with a CSS name to return that CSS
name, now that we have added API for it.
This means that style properties are now matches using the CSS name.
Also fix the theme to use the correct name when matching style properties.
|
|
|
|
|
|
|
|
|
|
| |
See the previous commit for why this is necessary.
Also make gtk_widget_class_set_css_name work by looking at
the correct class for the name.
Note for future reference: GTK_WIDGET_GET_CLASS() does not
work in the instance init function.
|
|
|
|
| |
gtk_widget_class_set/get_css_name were missing it.
|
|
|
|
| |
This is to replace using class names as CSS names.
|
| |
|
|
|
|
|
|
|
| |
Almost all callers of _gtk_widget_draw already did their own
cairo_save/restore, so drop the save/restore calls inside
_gtk_widget_draw and instead fix the last caller, gtk_widget_draw,
to do the same.
|
| |
|
|
|
|
|
|
|
|
| |
We can use gdk_window_peek_children here, instead of copying
the list. Note that we preserve the bottom-to-top ordering by
iterating the list from the end.
gdk_window_get_children_with_user_data was doing a list
reversal while filtering the list.
|
|
|
|
| |
Avoid copying the child window lists. It is not necessary.
|
|
|
|
|
|
| |
Instead of constructing a single list of all windows associated
to a widget, just iterate the children lists recursively, avoiding
allocations.
|
|
|
|
|
|
| |
Following a similar change in GLib a while ago.
'bla' may by stupid, but it looks less dumb than `bla'.
|
| |
|
|
|
|
|
| |
Remove widgets from their size groups in dispose, without connecting
to ::destroy. The signal handler is not necessary.
|
|
|
|
|
| |
We can't modify the lists returned from gdk_window_peek_children,
instead use get_children().
|
|
|
|
|
|
|
|
| |
The default event bubbling paths are prone to just running event controllers
even after the widget was potentially unrealized/destroyed in an event
handler callback, so bail out early if that's the case.
https://bugzilla.gnome.org/show_bug.cgi?id=755352
|
|
|
|
|
|
| |
gestures"
This reverts commit 13873d2c507783042df55ad2c48f37a346121fd0.
|
|
|
|
|
|
| |
unrealize/destroy"
This reverts commit 3aaf730901d04a3e4a102cb95e769a48ec5027e3.
|
|
|
|
| |
This reverts commit 63e255e7b5326888e83bf84f1147012938c81000.
|
|
|
|
|
|
|
|
|
| |
It makes no sense to skip denied sequences here, the gestures are
still carrying out the accounting for these, which must be also put
to an end if we're possibly not receiving any further events from
this sequence.
https://bugzilla.gnome.org/show_bug.cgi?id=754098
|
|
|
|
|
|
|
|
|
|
| |
At the time event_check_cancel_sequence_on_hierarchy() is called, the widget
has been already unparented. Given the widget itself is being destroyed,
cancellation on it is impending in one way or another, we still must
propagate cancellation across all parents, so retrieve it early before
possible widget destruction.
https://bugzilla.gnome.org/show_bug.cgi?id=754098
|
|
|
|
|
| |
We were notifying can-focus when can-default changes.
Unit tests save the day.
|
|
|
|
|
|
|
| |
The GtkEventController event mask is private, and set early by GtkGesture
implementations. Being this private data, there is no corresponding
property, so this code is a no-op, there is just no need to listen to
changes there.
|
|
|
|
|
|
|
|
|
|
|
|
| |
We use to rely on grab broken events for most of the event sequence
lifetime, this breaks though on GDK_BUTTON_RELEASE/GDK_TOUCH_END, as there's
no longer a grab at that time.
For these cases (and all others where there's destroy/unrealize calls
involved during event dispatching), catch this on the late
WIDGET_REALIZED_FOR_EVENT calls on widget event handling functions.
https://bugzilla.gnome.org/show_bug.cgi?id=754098
|
|
|
|
|
|
|
| |
This "cancel sequence across widget hierarchy" code will be useful
in other places, so take it out to a separate function.
https://bugzilla.gnome.org/show_bug.cgi?id=754098
|
|
|
|
| |
This avoids all the overhead of signal emissions when it is not used.
|