Benjamin Otte
2db43edbd6
snapshot: Don't handle clip anymore
...
If widgets want to clip things, they now need to do it themselves.
By not taking care of clip, we avoid the need to track clip. And by not
tracking clip, we can avoid all unnecessary cache invalidations that we
were doing for render nodes whenever the clip changed.
And when you are scrolling, the clip changes *a lot*.
2018-04-17 23:21:37 +02:00
Daniel Boles
3b2a03367c
MenuShell: Avoid compiler warning re un/signed cmp
...
priv->button is a guint, but we assigned it to a local gint.
gtk/gtkmenushell.c:734:37: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
if (button && (new_button != button) && priv->parent_menu_shell)
^
2018-04-17 20:53:48 +01:00
Daniel Boles
d13e78831b
Menu|Item: Fix FIXME re non-const interned strings
...
These are members of the private struct, so it hurts no one to fix this.
2018-04-17 20:53:48 +01:00
Daniel Boles
4fae962a03
Menu: Remove redundant typecheck in private func
...
Everything that calls this already ensured we are a valid GtkMenu.
2018-04-17 20:40:21 +01:00
Daniel Boles
8fd0ee96a6
Menu: Update @accel_path annotation/description
2018-04-17 20:40:21 +01:00
Daniel Boles
48472a4b04
Menu: Typecheck AccelGroup passed via public API
2018-04-17 20:40:21 +01:00
Daniel Boles
24953ab1be
Menu: Typecheck before dereferencing to get ->priv
2018-04-17 20:40:21 +01:00
Daniel Boles
2a7e5d5137
MenuShell: Sanitise take_focus bool via public API
...
We store in priv then compare it later, so better make sure it’s 0 or 1.
2018-04-17 20:40:21 +01:00
Daniel Boles
f6ba206d07
MenuShell: Typecheck the instance @ select_first()
...
since this is public API and therefore might get junk passed to it.
2018-04-17 20:21:05 +01:00
Daniel Boles
331f9762cc
CellRenderer: Link to CellEditable.start_editing()
...
...from CellRenderer::start-editing, to point people in the direction of
info about the lifecycle of the Editable and how to do generic setup.
https://gitlab.gnome.org/GNOME/gtk/issues/154
2018-04-17 19:07:39 +01:00
Daniel Boles
aaf2e30a48
CellRenderer: Clarify doc of .start_editing()
...
Drop the line copied from .activate(), replace it with a description of
what this method actually does, and explain what a NULL result means.
https://gitlab.gnome.org/GNOME/gtk/issues/154
2018-04-17 19:07:39 +01:00
Daniel Boles
50feed4c28
CellRenderer: Entry is not the only CellEditable
...
so link to GtkCellEditable and note that GtkEntry is just one example.
2018-04-17 19:07:39 +01:00
Daniel Boles
0fd9362e91
CellRenderer|Editable: Don't @See_also subclasses
...
The documentation knows that from the inheritance hierarchy, without us
having to manually duplicate that info here. Link to each other instead.
2018-04-17 19:07:39 +01:00
Daniel Boles
bdb7815b0c
CellEditable: Clarify doc on lifecycle of editable
...
* Note in the intro that we're really thinking about temporary widgets
* Mention a gotcha regarding GtkEntry and how ::focus-out stops editing
* Give some examples of what you'd want to do in ::editing-done
* Be a bit more precise about what ::remove-widget represents
* Summarise the lifecycle between Renderer/Editable in .start_editing()
* Emphasise again there that this should be viewed as a temporary widget
https://gitlab.gnome.org/GNOME/gtk/issues/154
2018-04-17 19:07:39 +01:00
Daniel Boles
59a8ffd35e
CellEditable: Move arg description to right place
...
Move it from the body to the argument line, and while there, update
the deprecated (allow-none) to (nullable).
2018-04-17 19:07:39 +01:00
Daniel Boles
44682256a9
CellEditable: Fix grammar error in doc synopsis
2018-04-17 19:07:39 +01:00
Matthias Clasen
3e9a68be83
No need to clear GTK_MODULES anymore
...
Not a variable we care about nowadays.
2018-04-15 22:03:50 -04:00
Timm Bäder
b0e9dc4723
tooltip: Ignore events with pressed buttons
...
We dont' want to show tooltips in those cases.
2018-04-15 17:12:01 +02:00
Timm Bäder
172b0e7ea0
frame: Use underscores in widgets ids in the docs
...
They will work in composite widget templates this way.
2018-04-15 17:12:01 +02:00
Timm Bäder
bf08537885
frame: Remove priv pointer
2018-04-15 17:12:01 +02:00
Timm Bäder
be77e0d500
frame: Stop saving label and child allocation
...
We don't use them for anything anymore.
2018-04-15 17:12:01 +02:00
Timm Bäder
2f95b4dd70
Remove gtk_render_icon_surface
...
As part of removing all the cairo_surace_t usage. There's still
gtk_render_icon for the same purpose that takes a GdkTexture*
2018-04-15 17:12:01 +02:00
Timm Bäder
4b02982e1c
widget: Use _set_has_tooltip everywhere
...
real_set_has_tooltip sounds like it's a vfunc implementation, but it
wasn't. The force parameter was also useless so just remove that.
2018-04-15 17:12:01 +02:00
Timm Bäder
914656b8b6
widget: Use priv pointer directly
2018-04-15 17:12:01 +02:00
Timm Bäder
5f02caf09b
widget: Update docs to mention ::draw less
2018-04-15 17:12:01 +02:00
Matthias Clasen
d48084dad9
font chooser: Allow tweaking fractions
...
This makes some sense, and frac is meant to be set globally.
2018-04-14 20:28:27 -04:00
Timm Bäder
1db1a30339
flowbox: Remove unnecessary queue_draw call
2018-04-14 12:50:17 +02:00
Timm Bäder
1195bb3872
paned: Remove outdated comment
...
The cursor is not updated in state_flags_changed these days.
2018-04-14 12:50:17 +02:00
Timm Bäder
c18219c5a8
snapshot: don't create offset nodes inside offset nodes
...
It's pretty easy to make that one offset node.
2018-04-14 11:47:02 +02:00
Timm Bäder
3a995b41d7
widget: Avoid a dead assignment
2018-04-14 11:47:02 +02:00
Timm Bäder
497d2f8c50
tooltip: Avoid some possibly uninitialized values
2018-04-14 11:47:02 +02:00
Timm Bäder
0965812e37
scrolledwindow: Fix indicator revealing
...
We need to increase the scrollbar bounds size.
2018-04-11 19:14:55 +02:00
Emmanuele Bassi
a2a99d27c9
Simplify the Wayland code generation
...
Instead of going through an ancillary script to strip away the
`WL_EXPORT` annotation from the generated code, we should bump up the
required version of Wayland, and use the `private-code` argument for
wayland-scanner, which does the right thing for us.
2018-04-11 15:06:43 +01:00
Benjamin Otte
2dd37e9624
widget: Not all toplevels are containers
...
Guard against GtkInvisible.
2018-04-11 04:04:37 +02:00
Benjamin Otte
b79c138100
widget: Only start/stop idle sizers for toplevels
...
They are the only widgets that have idle sizers.
2018-04-11 03:16:34 +02:00
Benjamin Otte
2abf082231
widget: Move frame clock handling to vfunc
...
Instead of connecting to / disconnecting from the frame clock, do it
inside the vfuncs next to changing the priv->realized boolean.
This removes a race between those 2 cases that could cause child
widgets' unrealize handlers to reconnect this widget to the frame clock
because it was still marked as realize when the widget had already
disconnected from the frame clock.
Fixes #168
2018-04-11 03:16:34 +02:00
Benjamin Otte
7ef8cb652b
widget: Remove gtk_widget_set_realized()
...
Everybody chains up now.
2018-04-11 03:16:34 +02:00
Benjamin Otte
5abc4749de
gtk: Chain up in toplevels' realize
...
Don't call set_realized() manually.
2018-04-11 03:16:34 +02:00
Benjamin Otte
5c51a302a4
widget: Make gtk_widget_real_realize() stricter
...
But in turn, also allow it to work on widgets with their own surface.
This way, we can chain up from everywhere and won't have to export
gtk_widget_set_realized().
2018-04-11 03:16:34 +02:00
Benjamin Otte
0af5316f00
widget: Assert unrealizing
...
Instead of just setting the flag, assert that it was set.
2018-04-11 03:16:34 +02:00
Benjamin Otte
2862ee7682
widget: Remove unused member
2018-04-11 03:16:34 +02:00
Benjamin Otte
3ee2aa1b22
container: Remove gtk_container_maybe_start_idle_sizer()
...
Fold it into gtk_container_start_idle_sizer()
2018-04-11 03:16:34 +02:00
Benjamin Otte
21f15094fb
container: Remove gtk_container_queue_resize_handler()
...
It's the same as gtk_container_maybe_start_idle_sizer()
2018-04-11 03:16:34 +02:00
Benjamin Otte
3df94fe099
container: Use maybe_start_idle_sizer()
...
That way, we don't accidentally start an idle sizer for unrealized
widgets.
2018-04-11 03:16:34 +02:00
Benjamin Otte
e0415fccd7
window: Don't queue resize handler
...
It's not needed, because the queue_allocate() call right above it does
this work.
2018-04-11 03:16:34 +02:00
Benjamin Otte
b591d7bc20
widget: Don't queue resize handler twice
...
We already queue it when we set_alloc_needed(), so there's no need to do
it again.
2018-04-11 03:16:34 +02:00
Benjamin Otte
d6477d0894
container: Don't store the resize clock
...
Use gtk_widget_get_frame_clock() instead
2018-04-11 03:16:34 +02:00
Benjamin Otte
e44bbeb558
filechooserbutton: Fix reserved pointers
...
So gcc stops complaining about unnecessary parenthesis.
2018-04-10 15:13:38 +02:00
Timm Bäder
3db4f805ee
widgetfocus: Use gtk_widget_compute_bounds
...
Instead of gtk_widget_get_allocation.
2018-04-10 09:44:14 +02:00
Timm Bäder
3ce6355bf4
widget: Remove _get_own_allocation
...
Replace all usages of it with _compute_bounds
2018-04-10 09:43:47 +02:00