| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
Use gtk_widget_get_allocated_width/height in the only user (GtkStack),
even though that isn't 100% correct.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to remove the weak pointer, as the stack switcher can
keep the list model alive beyond the stack. This was observed
to cause crashes:
==16870== Invalid write of size 8
==16870== at 0x5168A4E: g_nullify_pointer (gutils.c:2284)
==16870== by 0x522C500: weak_refs_notify (gobject.c:2791)
==16870== by 0x50FE7BC: g_data_set_internal (gdataset.c:407)
==16870== by 0x50FECA7: g_datalist_id_set_data_full (gdataset.c:670)
==16870== by 0x5227EB4: g_object_real_dispose (gobject.c:1056)
==16870== by 0x522D295: g_object_unref (gobject.c:3309)
==16870== by 0x4AF849F: unset_stack (gtkstackswitcher.c:428)
==16870== by 0x4AF892E: gtk_stack_switcher_dispose (gtkstackswitcher.c:527)
|
|
|
|
| |
This makes the list model available in the inspector.
|
|
|
|
|
|
| |
We have to be careful to not pass bad numbers to
this signal, which was happening in cases where
we have on old or new selected item.
|
|
|
|
|
|
| |
When the stack goes empty, we were failing to reset
the visible_child member to NULL, causing problems later
on, since we don't have a ref for it.
|
|
|
|
|
| |
The page holds a reference to the widget, so can't just clear
this pointer.
|
|
|
|
|
| |
Instead of using the list model api that forces us
to drop the ref, just work with the list we have.
|
|
|
|
|
|
| |
GtkStackSwitcher and GtkStackSidebar no longer
use the GtkStackPage::position property, so we
don't need to maintain it anymore.
|
|
|
|
|
|
| |
Make GtkStack expose a selection model for its pages.
The model can be used to track changes to the pages,
and to change what child is visible.
|
|
|
|
|
| |
This will let GtkStackSwitcher track visibility
without having to interact with the widgets directly.
|
|
|
|
| |
This was showing up in testsuite failures.
|
|
|
|
| |
We have tests that expect this to work, like defaultvalue.
|
|
|
|
|
|
|
| |
Create a GtkStackPage public object which holds the former
child properties of GtkStack.
Adjust all callers.
|
|
|
|
| |
Both queue_allocate and queue_resize already queue a draw.
|
|
|
|
|
| |
The values have been 0/0 for a long time now, so just drop the
GtkAllocation argument and replace it with width and height.
|
|
|
|
|
|
|
|
|
| |
The gtk_stack_snapshot_slide() function dereferences the
last_visible_child pointer without proper != NULL ckeck. This might
result in NULL pointer dereference and crash if last_visible_child is
invalid.
Add a != NULL check before dereferencing the pointer.
|
|
|
|
|
| |
4.0 will represent a clean epoch. We don't want to have
lots of noise in the docs about 2.x or 3.x.
|
|
|
|
|
| |
Instead of every snapshot function having debug messages, have an
explicit gtk_snapshot_push_debug() function that appends a debug node.
|
|
|
|
|
|
|
| |
Return with error if gtk_stack_set_visible_child_name is called
with NULL parameter
(cherry picked from commit 2ee5aee4a9f01cce3dda7dff877070b62c3e2880)
|
|
|
|
| |
As the clip is no longer needed, get rid of it.
|
|
|
|
|
| |
It's not used anymore. And anybody who wants to have a clip on a
newly created snapshot can achieve that using gtk_snapshot_push_clip().
|
|
|
|
| |
Push an offset node when append_node is called. That resets the offset.
|
|
|
|
|
| |
Now that there's no longer a need to keep the renderer around for Cairo
rendering, don't do that then.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an automated change doing these command:
git sed -f g gtk_widget_set_has_window gtk_widget_set_has_surface
git sed -f g gtk_widget_get_has_window gtk_widget_get_has_surface
git sed -f g gtk_widget_set_parent_window gtk_widget_set_parent_surface
git sed -f g gtk_widget_get_parent_window gtk_widget_get_parent_surface
git sed -f g gtk_widget_set_window gtk_widget_set_surface
git sed -f g gtk_widget_get_window gtk_widget_get_surface
git sed -f g gtk_widget_register_window gtk_widget_register_surface
git sed -f g gtk_widget_unregister_window gtk_widget_unregister_surface
git checkout NEWS*
|
|
|
|
|
| |
We can avoid direct struct access and gtksnapshotprivate.h
everywhere.
|
|
|
|
|
| |
Use the new/free api instead of init/finish
for GtkSnapshot.
|
|
|
|
|
|
|
| |
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
|
|
|
|
|
| |
And remove the function itself. Make everything use gtk_widget_get_width
and gtk_widget_get_height instead.
|
|
|
|
| |
This avoids a bunch of strdups at startup.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes that work using 1 of 2 options:
1. Add all missing enums to the switch statement
or
2. Cast the switch argument to a uint to avoid having to do that (mostly
for GdkEventType).
I even found a bug while doing that: clearing a GtkImage with a surface
did not notify thae surface property.
The reason for enabling this flag even though it is tedious at times is
that it is very useful when adding values to an enum, because it makes
GTK immediately warn about all the switch statements where this enum is
relevant.
And I expect changes to enums to be frequent during the GTK4 development
cycle.
|
|
|
|
| |
This fixes Coverity CID 1452217.
|
|
|
|
|
|
|
|
|
|
|
| |
Since setting a clip is mandatory for almost all widgets, we can as well
change the size-allocate signature to include a out_clip parameter, just
like GtkCssGadget did. And since we now always propagate baselines, we
might as well pass that one on to size-allocate.
This way we can also make sure to transform the clip returned from
size-allocate to parent-coordinates, i.e. the same coordinate space
priv->allocation is in.
|
|
|
|
| |
make sure we initialize both width and height with proper values.
|
| |
|
| |
|
|
|
|
|
| |
The position of the content allocation is almost never relevant since
it's 0/0 for measure, size_allocate and snapshot.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
always initialize clips to the (content) allocation, don't walk up the
widget hierarchy in gtk_widget_set_clip, implement
gtk_widget_size_allocate in GtkSeparator. This way we don't end up using
uninitialized clip values.
The entire clip handling is up for major rework since we can't and don't
want to force every single widget to call _set_clip in size-allocate
implementations.
|
| |
|
|
|
|
|
| |
This widget already sets a clip area, so the view window can be safely
removed.
|
|
|
|
|
|
|
|
|
|
| |
We now rely on toplevels receiving and forwarding all the events
the windowing should be able to handle. Event masks are no longer a
way to determine whether an event is deliverable ot a widget.
Events will always be delivered in the three captured/target/bubbled
phases, widgets can now just attach GtkEventControllers and let those
handle the events.
|
|
|
|
|
|
| |
with include_internals=TRUE, this is the same as the (still private)
gtk_widget_forall, or just using the children/sibling accessors in a
loop.
|
| |
|
|
|
|
|
|
|
|
| |
gtk_snapshot_pop() => removed
gtk_snapshot_pop_and_append() => gtk_snapshot_pop()
So now there is no way to get a rendernode out of the snapshotting API
until you gtk_snapshot_finish().
|
|
|
|
| |
This is in preparation for API changes in GtkSnapshot.
|
|
|
|
|
|
|
|
| |
... and use it.
The function is a bit awkward because it requires 2 calls to
gtk_snapshot_pop(), but once you accept that, it's very convenient to
use, as can be seen by the 2 implementations.
|
| |
|
|
|
|
|
| |
Otherwise we do a lot of allocations and vprintf calls which are
not used.
|
|
|
|
| |
Replace it with the already existing gtk_widget_snapshot_child.
|