Commit Graph

56967 Commits

Author SHA1 Message Date
Matthias Clasen
5fb96392e3 Merge branch 'entry-sizing' into 'master'
Entry sizing

Closes #1721

See merge request GNOME/gtk!670
2019-03-27 05:55:06 +00:00
Matthias Clasen
7843382784 text: Allow growing entries
Add a propagate-text-width property, which, when set,
makes the entry request a natural width that is just
enough to fit the content, within the limits given
by width-chars and max-width-chars.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1721
2019-03-27 01:42:00 -04:00
Matthias Clasen
544fe83864 search entry: Fix sizing
Use the same sizing approach we use for GtkEntry:
ignore icons when measuring. This ensures that
search entries don't change size as icons come
and go.
2019-03-27 01:42:00 -04:00
Matthias Clasen
8a9290d0ba password entry: Fix sizing
Use the same sizing approach we use for GtkEntry:
ignore icons when measuring. This ensures that
password entries don't change size as icons come
and go.
2019-03-27 01:42:00 -04:00
Matthias Clasen
8d4343a550 Merge branch 'get_caret_offset_negative_one' into 'master'
Return -1 for AtkText::get_caret_offset on failure

See merge request GNOME/gtk!666
2019-03-26 23:14:48 +00:00
Matthias Clasen
8984320964 Merge branch 'gdk-api-cleanups' into 'master'
Gdk api cleanups

See merge request GNOME/gtk!669
2019-03-26 22:37:27 +00:00
Matthias Clasen
c0aaa43122 Rename gdk_device_get_surface_at_position_double
We can drop the double suffix now.
2019-03-26 18:12:55 -04:00
Matthias Clasen
5935f26a1d Drop gdk_device_get_surface_at_position
It is no longer used.
2019-03-26 18:12:55 -04:00
Matthias Clasen
562cc8b9ab gtk: Stop using gtk_device_get_surface_at_position
We should always use the double variant of the api.
2019-03-26 18:12:55 -04:00
Matthias Clasen
9021e7d3cd gdk: Stop using gdk_device_get_surface_at_position
We should always use the double variant.
2019-03-26 18:12:55 -04:00
Matthias Clasen
03eb455c93 Rename gdk_device_get_position_double
We can drop the double suffix now.
2019-03-26 18:12:55 -04:00
Matthias Clasen
6288043ec2 Drop gdk_device_get_position
It is no longer used.
2019-03-26 18:12:55 -04:00
Matthias Clasen
7e4707642a gtk: Stop using gdk_device_get_position
We should always use the double variant of this api.
2019-03-26 18:12:55 -04:00
Matthias Clasen
8dece0e940 gdk: Stop using gdk_device_get_position
We should always use the double variant of this api.
2019-03-26 18:12:55 -04:00
Matthias Clasen
21580309d3 Rename gdk_surface_get_device_position_double
Drop the _double suffix, now that the int version is gone.
2019-03-26 18:12:54 -04:00
Matthias Clasen
f1d61d5515 Drop gdk_surface_get_device_position
Not used anymore.
2019-03-26 18:08:39 -04:00
Matthias Clasen
2d10a7b9c4 gtk: Stop using gdk_surface_get_device_position
Use the double version directly.
2019-03-26 18:08:32 -04:00
Matthias Clasen
54a969e0ad gdk: Stop using gdk_surface_get_device_position
Use the double variant instead.
2019-03-26 17:55:29 -04:00
Matthias Clasen
eb4e7b9172 Remove GtkWindow::gravity
This was used to interpret the position passed
to gtk_window_move. Since that is gone, gravity
is no longer useful.
2019-03-26 17:55:29 -04:00
Matthias Clasen
de741e57f3 tests: Stop using gtk_window_set_gravity
This api is going away.
2019-03-26 17:55:29 -04:00
Matthias Clasen
0481f123ea Drop gtk_window_move and gtk_window_get_position
These functions operate with global coordinates,
which are not available on Wayland.
2019-03-26 17:55:29 -04:00
Matthias Clasen
6f072c80db treeview: Stop using gtk_window_move
It is going away. The search popup needs to be
redone using popovers.
2019-03-26 17:55:29 -04:00
Matthias Clasen
2ed533c3e1 file chooser: Stop using gtk_window_get_position
It is going away.
2019-03-26 17:55:29 -04:00
Matthias Clasen
27c286773c tests: Stop using gtk_window_move
It is going away.
2019-03-26 17:55:29 -04:00
Matthias Clasen
f7d3815fa8 a11y: Don't support changing widget size and position
This does not make sense.
2019-03-26 17:55:29 -04:00
Matthias Clasen
d45996c728 Avoid root coordinates in begin_drag/move apis
Change the all the begin_drag and begin_move apis in
GdkSurface and GtkWindow to expect surface coordinates.

Update the x11 implementation to translate to root
coordinates where it matters. Wayland is ignoring the
coordinates anyway.
2019-03-26 15:57:11 -04:00
Matthias Clasen
6b6f26ed45 Add a window move/resize test 2019-03-26 15:57:04 -04:00
Emmanuele Bassi
060e30de3f Turn GtkFixedLayoutChild:position into a transformation
This way we can transform children instead of just allocating them at an
offset.
2019-03-26 19:17:26 +00:00
Emmanuele Bassi
fc33bf2d1f Skip all LayoutChild when testing
GtkLayoutChild instances are created on demand once we have a widget, a
GtkLayoutManager, and a child widget. This makes testing their creation
fairly tricky.

Let's skip them, for the time being.
2019-03-26 18:46:55 +00:00
Emmanuele Bassi
dd5c981b63 Use GtkFixedLayout in GtkFixed
Drop the child properties and the sizing code.
2019-03-26 18:15:13 +00:00
Emmanuele Bassi
9a4c19349e Add GtkFixedLayout
A layout manager for fixed positioning.
2019-03-26 17:43:53 +00:00
Emmanuele Bassi
3389ddf6fc Do not connect to a non-existing signal
The GtkWidget::parent-set signal was removed in ff6cd8f7.

Instead of removing GtkLayoutChild instances associated to a widget
using notifications when the widget's parent changes, we can have
gtk_widget_unparent() call a method on GtkLayoutManager to remove any
eventual GtkLayoutChild instances associated to the widget.
2019-03-26 17:37:49 +00:00
Emmanuele Bassi
341660e056 Drop warning from GtkLayoutManager::get_request_mode()
We can return a sensible default value, so we don't really need to warn
about a missing implementation.
2019-03-26 17:37:49 +00:00
Piotr Drąg
b42bf99b13 Update POTFILES.in 2019-03-26 18:36:51 +01:00
Alexander Larsson
18d814d2ce Merge branch 'wip/alexl/broadway5' into 'master'
Update broadway for gtk4

See merge request GNOME/gtk!667
2019-03-26 16:25:10 +00:00
Alexander Larsson
6fce18e1a1 broadway: Remove some spew 2019-03-26 17:09:41 +01:00
Alexander Larsson
cf4226586a broadway: Load all textures before applying display ops, fixing flickers 2019-03-26 17:07:47 +01:00
Alexander Larsson
0481aa10e7 broadway: Use const use for constants in the js code 2019-03-26 17:07:47 +01:00
Alexander Larsson
edbaa0964f broadway: Clean up stuff using const defines 2019-03-26 17:07:47 +01:00
Alexander Larsson
fbefec52a5 Broadway: Add id for nodes and reuse old ones
When sending render nodes from the client to the daemon we add an id,
and whenever we're about to re-send the entire tree node we instead
send the old id. We track all the nodes for the previous frame
of the surface this way.

Having the id on the daemon side will allow us do to much better deltas.
2019-03-26 17:07:47 +01:00
Alexander Larsson
d59d8b5dd4 Disable accidental debug spew 2019-03-26 17:07:47 +01:00
Alexander Larsson
87a13fe3d2 broadway: Prepare for splitting display ops out of command handling 2019-03-26 17:07:47 +01:00
Alexander Larsson
2f85443e37 broadway: Refcount textures
We want to delay some rendering, and to make that safe we need to correctly
refcount the use of blob uris for the textures so that we don't unref
it while something is scheduled to use it.
2019-03-26 17:07:47 +01:00
Alexander Larsson
311aa01e01 broadway: Simplify fallback node cache
Since nodes are now cached we just store the fallback as a
texture in a hashtable indexed by the node. If its unused for
5 frames we drop it.
2019-03-26 17:07:47 +01:00
Alexander Larsson
3bbbe9f71b broadway: Don't crash of drag-resizing when already active
This is what the X11 code does.
2019-03-26 17:07:47 +01:00
Alexander Larsson
890b759091 broadway: Send actual float32, not some hack 2019-03-26 17:07:47 +01:00
Alexander Larsson
d997903d29 broadway: Use DataView instead of hand-rolled int parsers
This is nicer in general, but also will let us do floats more sanely.
2019-03-26 17:07:47 +01:00
Alexander Larsson
b097f0a7d8 Broadway: Add node for debug nodes
This can be helpful when debugging broadway.
2019-03-26 17:07:47 +01:00
Alexander Larsson
1b5b1bfd0e broadway: Don't fall back for translation transform nodes
These are trivial anyway
2019-03-26 17:07:47 +01:00
Christoph Reiter
c94867f8a1 CI: set a timeout multiplier for the tests
CI can be slower than your normal dev machine so give it a bit more time
2019-03-26 16:37:22 +01:00