Commit Graph

39630 Commits

Author SHA1 Message Date
Emmanuele Bassi
196ec107d1 Keep FileChooserNative alive while a portal is running
Even if the FileChooserNative instance drops out on us while we're still
waiting for the portal to answer, we should keep the data and pointers
alive until the sequence of asynchronous operations is running. The code
already tries to do that, by acquiring a strong reference to the
GtkFileChooserNative instance, but it's also freeing data as soon as the
dialog is hidden, while asynchronous callbacks that will look at the
fields on that data are still in flight.

To avoid that, we defer freeing the data until the asynchronous
callbacks are invoked, and we keep a reference on the dialog while we're
emitting signals on it.

Fixes: #4883
2022-04-29 15:27:10 +01:00
Emmanuele Bassi
b3f04413b4 Merge branch 'wip/sophie-h/fix-4020' into 'main'
filechooser: Small fix for select folder mode

Closes #4020

See merge request GNOME/gtk!4650
2022-04-27 13:46:14 +00:00
Federico Mena Quintero
737854aa0d Don't cast GtkWrapMode to the incompatible enum PangoWrapMode
The enum values are not compatible, and moreover, there is an extra
GTK_WRAP_NONE that PangoWrapMode doesn't have - thus,
pango_wrap_mode_to_string() will assert.

As far as I can tell, Orca does not read the wrap-mode key in the
dictionary for text attributes, anyway.

Fixes: #4869
2022-04-26 13:43:19 -05:00
Benjamin Otte
515b1f5292 boxlayout: Do not infloop
if the loop for determining max width grows too big, print an error and
abort assuming that a satisfactory value was reached.

This will cause wrong layout and might cause widgets to overlap, but it
will not infloop.

It actually works around and doesn't really fix the primary cause of the
following bugs, but good enough to close them:

Fixes: #4252
Fixes: #4517
2022-04-26 19:56:01 +02:00
Benjamin Otte
ea79f2dcf4 roaring: Remove extra careful code
because gcc knows it's too careful
2022-04-26 19:38:36 +02:00
Florian Müllner
b82fae9177 gtk/popovermenu: Fix transfer annotation of new_from_model_full()
The function doesn't return a full reference, but a floating widget
like comparable constructor functions.
2022-04-26 14:30:21 +02:00
Carlos Garnacho
d6fe6f495a imcontextwayland: Ignore preedit updates from NULL to NULL
If we get consecutive preedit string updates that announce a NULL
string, we still do end up issuing ::preedit-changed with those.
Ignore changes from NULL to NULL, it is the other combinations which
must issue this signal.
2022-04-26 12:23:09 +02:00
Alexander Mikhaylenko
1ca2d41a98 icons: Use the proper eye icons
adwaita-icon-theme has more appropriate icons for showing/hiding text now.
use those, and in the process fix the fact GtkPasswordEntry has been using
them the other way around.
2022-04-22 16:22:05 +04:00
Matthias Clasen
0ea3dcacb0 theme: Fix vertical spin button selection
The selection should be black-on-blue as it is
everywhere else now. This was just a leftover.

Fixes: #4788
2022-04-19 23:14:37 -04:00
Emmanuele Bassi
17262d1572 a11y: Defer object registration after root registration
The root accessible object is registered asynchronously, as it needs to
call a method on the AT-SPI registry daemon. This means we need to defer
registering the GtkAtSpiContext on the accessibility bus and in the
cache until after the registration is complete.

Fixes: #4825
2022-04-19 16:35:27 +01:00
Emmanuele Bassi
4dcd02e853 Quench the anger of GCC
Direct access of the fields of the union trips compiler warnings with
GCC 12, such as:

  ../gtk/gtkimagedefinition.c:135:13: error: array subscript
  ‘GtkImageDefinition {aka union _GtkImageDefinition}[0]’ is partly
  outside array bounds of ‘GtkImageDefinitionEmpty[1]’ {aka
  ‘struct _GtkImageDefinitionEmpty[1]’} [-Werror=array-bounds]
2022-04-19 15:33:21 +01:00
Matthias Clasen
c882a611c8 Fix file filter buildable support
File filters creates from ui files had some
extraneous gunk in them. Fix that. Test included.

Fixes: #4787
2022-04-18 23:03:15 -04:00
Sophie Herold
908661fee6 filechooser: Small fix for select folder mode
When changing folders, we were making the select
button insensitive when there is no folder selected.
However, the select button should be usable to
select the current folder.

Fixes #4020
2022-04-19 00:55:05 +02:00
Marcel Tiede
527ff05107 docs: Fix typo in description of GtkExpression 2022-04-18 06:20:19 +00:00
Matthias Clasen
bc17d1d5ea Merge branch 'wip/exalm/scrolled-window' into 'main'
scrolledwindow: Pick up gtk-overlay-scrolling changes on the fly

See merge request GNOME/gtk!4642
2022-04-17 16:07:59 +00:00
Matthias Clasen
d30baf34b3 Merge branch 'filechooser-entry-popup' into 'main'
filechooser: Prevent random completion popups

See merge request GNOME/gtk!4643
2022-04-17 03:51:32 +00:00
Matthias Clasen
4540dac11a filechooser: Prevent random completion popups
It is very irritating when the entry completion popup
appears not in response to user input in the entry.
In particular, when that happens right as the dialog
is shown.

To prevent that, temporarily disable completion
when setting the entry text programmatically.
2022-04-16 23:29:04 -04:00
Matthias Clasen
aa9cac695d filechooser: Small fix for save mode
When changing folders, we were making the select
button insensitive when there's no files around.
That doesn't make sense in save mode when we don't
want to select a file but create one.

Fixes: #4851
2022-04-16 22:00:22 -04:00
Alexander Mikhaylenko
52412ca944 scrolledwindow: Pick up gtk-overlay-scrolling changes on the fly 2022-04-16 16:56:17 +04:00
Alexander Mikhaylenko
cd82b18cfd scrolledwindow: Fix :kinetic-scrolling setter 2022-04-16 16:30:33 +04:00
Alexander Mikhaylenko
7871f1e13b tooltipwindow: Don't restrict minimum tooltip label length
We only care about wrapping at that length, we still want short tooltips
for short labels.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3741
2022-04-16 03:48:21 +04:00
Alexander Mikhaylenko
dd18c7dedf tooltipwindow: Remove a duplicate gtk_widget_class_set_css_name() call 2022-04-16 03:28:50 +04:00
Emmanuele Bassi
0a5f29c9eb Mark nullable arguments in GtkPaned
The set_start_child() and set_end_child() methods take NULL for the
child argument, as a way to remove the child from the paned widget.
2022-04-14 22:44:17 +01:00
Emmanuele Bassi
417be0719b docs: Fix the GtkPaned style
Use proper links to properties and methods, and drop gtk-doc'isms.
2022-04-14 22:43:40 +01:00
Matthias Clasen
3263a26cad Merge branch 'fix_tooltip' into 'main'
label: Maintain value for `has-tooltip` for labels with links

See merge request GNOME/gtk!4635
2022-04-14 18:00:43 +00:00
Julian Sparber
e3320633a6 label: Move focus out of widget after last link
This allows the user to navigate via tab the links in a label and exits
the widget after the last link, when moving forward, and first link,
when moving backward.

This also ensures that ellipsised links arn't focused.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4681
2022-04-14 12:48:20 +02:00
Julian Sparber
764a8cea59 label: Maintain value for has-tooltip for labels with links
The `has-tooltip` property gets set to `false` for label with links if no
link is selected. This makes sure to only change the property to `true`
but never to `false`.
2022-04-13 19:05:53 +02:00
Ivan Molodetskikh
e2675306e1 scrollable: Clarify when to set adjustment props
Instead of populating the properties right away (when the widget might
not have been allocated yet, and hence cannot know the right values),
the widget should queue an allocation, where it will populate the
values.
2022-04-12 17:22:51 +03:00
Benjamin Otte
7d1429cb91 Merge branch 'gles-win32' into 'main'
Inspector: Fix running on Windows with GLES (was: fix running GL demos with GLES on Windows)

See merge request GNOME/gtk!4595
2022-04-08 22:00:33 +00:00
Matthias Clasen
09d5ec1b08 Merge branch 'n-docs-fixes' into 'main'
More doc fixes

See merge request GNOME/gtk!4618
2022-04-07 14:05:40 +00:00
Carlos Garnacho
eb7c78aa48 imwayland: Do not defer commit() after set_surrounding_text()
For reasons that only apply to the old serial handling, asking for
the surrounding after IM changes resulted in lazy handling of
commit() afterwards.

With the recent interpretation of serials, this problem became more
apparent, since it is in fact very likely that the last interaction
step after an IM change is notifying of the changed surrounding
text after the IM change was applied.

Make handling of surrounding text similar to caret position changes,
always commit() after the state change, but skip through non-changes.

This makes the compositor state fully up-to-date after an IM change.
2022-04-06 13:52:05 +02:00
Carlos Garnacho
7ab39b5461 imwayland: Connect OSK activating gesture to parent widget on editables
The gesture as connected currently on the child GtkText is easily overridden
by the parent editables (and gently done so in the attempt to consume all
clicks).

Connect this gesture to the parent editable widget in these cases, so the
gesture can cohabit with the click-consuming one. It's not part of the same
group, but it won't be abruptly cancelled.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4795
2022-04-06 13:52:05 +02:00
Maximiliano Sandoval R
ffa7185397
application: Add link and inline code blocks 2022-04-04 14:11:16 +02:00
Maximiliano Sandoval R
d7fe62817c
filter: Add link to FilterListmodel 2022-04-04 14:10:56 +02:00
Maximiliano Sandoval R
a034bdb17e
texttag: Correct typo
Does not generate a gir docstring without it.
2022-04-04 14:10:18 +02:00
Matthias Clasen
5d979cde82 inspector: Avoid another crash
We need to handle all event types here.
This was tripping over GDK_TOUCHPAD_HOLD events.
2022-04-03 15:55:21 -04:00
Matthias Clasen
f48b894468 inspector: Avoid a crash
Attribute lists can be NULL, it turns out.
2022-04-03 15:55:21 -04:00
Matthias Clasen
f57eec5288 css: Plug a memory leak
We were leaking the terms of calc values. Oops.
2022-04-03 08:04:35 -04:00
Matthias Clasen
59f9be457f imcontextsimple: Plug a memory leak 2022-04-02 15:30:47 -04:00
Maximiliano Sandoval R
ad5e72728f
docs: Fix links in selection models 2022-04-01 13:04:14 +02:00
Matthias Clasen
6030da573d Merge branch 'nls' into 'main'
Remove #ifdef ENABLE_NLS

See merge request GNOME/gtk!4606
2022-03-31 17:07:37 +00:00
Xavier Claessens
bcd0704511 Remove #ifdef ENABLE_NLS
libintl API is guaranteed to always be available, glib will fallback to
proxy-libintl in case gettext is not found.
2022-03-31 11:41:34 -04:00
Carlos Garnacho
b67da38916 gtkimmulticontext: Handle switches between displays
Currently the GtkIMMultiContext may stick to a delegate GtkIMContext
that no longer applies after the multicontext is dissociated from
any widget.

Handle set_client_widget() so that it can handle changes between
widgets from 2 different display, but also so the delegate is made
NULL whenever the context has a NULL widget.

Doing so, any new client widget results in a new delegate IM context
lookup from the right GdkDisplay and GtkSettings, which avoids any
mix up.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4805
2022-03-31 16:35:29 +02:00
Chun-wei Fan
89d87e3482 inspector/general.c: Check whether GL context supports WGL
We may well be using an EGL context that does not support Desktop (W)GL on
Windows, such as in the case of using libANGLE.  So, check whether WGL is
supported for this running instance before trying to query WGL extensions.

This will get rid of warning messages from libepoxy.
2022-03-30 16:09:18 +08:00
Alexander Mikhaylenko
9bd8ed0d82 eventcontrollerscroll: Always propagate hold events
Otherwise a stray scroll controller may prevent others from getting hold
events, even if it always propagates scroll events and does absolutely
nothing.
2022-03-28 12:04:15 +00:00
António Fernandes
351ffef704 overlaylayout: Set position style class on child
As documented:
> Overlay children whose alignments cause them to be positioned
> at an edge get the style classes “.left”, “.right”, “.top”, 
> and/or “.bottom” according to their position.

Likely accidental regression in b7ee2cbc28

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2099
2022-03-27 14:59:10 +00:00
Pablo Correa Gómez
314a75ed0f Set use_underline property for GtkCheckButton label conditionally
Otherwise, if the user set the property to False before creating or
setting the label, the label property will be overriden
2022-03-25 14:35:16 +01:00
Matthias Clasen
79f0f4ee8e inspector: Allow viewing PangoAttrList properties
We have pango_attr_list_to/from_string, so this is
easy. The editing UI isn't ideal, but it solves my
immediate need to see attributes.
2022-03-25 08:35:16 -04:00
Matthias Clasen
f76b749e43 Merge branch 'fix-popover-menu-rtl-position' into 'main'
popover-menu: Fix buttons' position in RTL

See merge request GNOME/gtk!4587
2022-03-23 02:16:41 +00:00
Christian Hergert
b726a2d902 Default: avoid use of opacity for overlay scrollbars
If using the opacity CSS property the renderer cannot optimize these
handles without the use of offscreens due to the use of both a border
and rgb render node.

Instead, we can apply the alpha to the color values and get the same
effect in a way that the GL renderer can optimize without the use of
offscreen textures for a sizeable reduction in runtime overhead.
2022-03-21 22:10:23 -07:00
Yosef Or Boczko
33f3ab9991 popover-menu: Fix buttons' position in RTL
The radio/check/previous buttons shows in
the wrong place in RTL. Fix it.

#4641

Signed-off-by: Yosef Or Boczko <yoseforb@gmail.com>
2022-03-20 00:54:26 +02:00
Carlos Garnacho
f7d9ede82d gtkkineticscrolling: Do not take distance based shortcuts
The pixel distance could be small enough between tick() calls that
this kind of checks might potentially become a problem. Rely only on
the calculated velocity to trigger the STOPPED phase, and use a lower
threshold to avoid cutting the animation too early.

Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/4725
2022-03-19 12:35:11 +01:00
Carlos Garnacho
65839f67f8 gtkscrolledwindow: Do not trigger kinetic helpers on 0 velocity
Doing this is pointless, so it could be skipped.
2022-03-19 12:35:11 +01:00
Carlos Garnacho
df40db137b gtkscrolledwindow: Change lifetime of kinetic scroll helpers
In order to properly accumulate scroll velocities, we need to keep
the kinetic scroll helpers after we have possibly stopped them
in the process of initiating a further scroll flick.

So, instead of stopping (and destroying) those helpers on scroll-begin,
keep them until the next scroll-end if a scroll was initiated before
kinetic scroll finished. This way we can fetch the last velocity when
calculating the extra kick.

In order to ensure the helpers don't live beyond what it is expected,
we now also remove them after a finished hold event.

Fixes the accumulation of scrolling velocity on consecutive scroll
sequences.
2022-03-19 12:35:11 +01:00
Carlos Garnacho
129bc27d53 gtkscrolledwindow: Refactor kinetic scroll animation
Do not depend on the kinetic scroll helpers existing or not before
exiting the animation, as we may want to keep those a little bit
longer after stopped.
2022-03-19 12:35:11 +01:00
Carlos Garnacho
274e2b221f gtkkineticscroll: Do not reset velocity after stop()
We may want to fetch the last velocity obtained, even though we
preemptively called stop() on a kinetic scroll helper. Keep this
velocity so it can be queried later on.
2022-03-19 12:35:11 +01:00
Sebastian Dröge
f058a42bd3 Add version marker to GtkSearchEntry:search-delay property 2022-03-19 11:56:05 +02:00
Sebastian Dröge
3a8cb276e7 Fix typo in gtk_search_entry_set_search_delay() docs causing it to not show up 2022-03-19 11:55:03 +02:00
Carlos Garnacho
8e455e333b Merge branch 'scroll-unit' into 'main'
GdkScrollEvent: indicate the delta unit with a new GdkScrollUnit enum

See merge request GNOME/gtk!4508
2022-03-19 00:47:08 +00:00
Matthias Clasen
3d10e6c3d1 Merge branch 'wip/carlosg/rewritten-events-from-other-toplevels' into 'main'
gtk/main: Make coords out of surface when rewriting events for grabs

Closes #4760

See merge request GNOME/gtk!4566
2022-03-19 00:34:17 +00:00
panoplie
f1d0886087 gtkeventcontrollerscroll: Map surface scroll unit in discrete steps 2022-03-19 00:41:26 +01:00
panoplie
951e4ee6b2 recorder: Show scroll events deltas unit 2022-03-19 00:41:26 +01:00
panoplie
f9e2c106bc gtkrange: Add scroll unit handling 2022-03-19 00:41:26 +01:00
panoplie
53956e5389 gtkscrolledwindow: Add scroll unit handling
On the "scroll" signal, the widget uses
gtk_event_controller_scroll_get_unit() to get the
scroll unit.

When the unit is GDK_SCROLL_UNIT_WHEEL, the
behavior is unchanged: the widget scrolls a
certain number of pixels at each wheel detent
click. This number of pixels is determined by the
window dimensions in get_wheel_detent_scroll_step().

When the delta unit is GDK_SCROLL_UNIT_SURFACE, the
widget directly adds the delta to the number of
scrolled pixels no matter the window dimensions.
2022-03-19 00:41:26 +01:00
panoplie
3ab63fd03b gtkeventcontrollerscroll: Add scroll unit getter
The scroll unit is accessible through
gtk_event_controller_scroll_get_unit() after the
"scroll" signal reception.
2022-03-19 00:41:26 +01:00
James Westman
8eb9844a45
filefilter: Fix <suffixes> in buildable
A bug in GtkFileFilter's GtkBuildable implementation caused the
<suffixes> tag not to be recognized.
2022-03-17 10:52:20 -05:00
Carlos Garnacho
581461c2b5 Merge branch 'wip/carlosg/im-wayland-serials' into 'main'
gtk/imwayland: Use serial to control outbound messages

Closes #3641

See merge request GNOME/gtk!4398
2022-03-16 18:52:24 +00:00
Carlos Garnacho
f108f053d4 gtk/imwayland: Use serial to control outbound messages
Following the text-input protocol changes at
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/115,
use the serial number to have the client push changes to the
zwp_text_input_v3 object only after compositor/client states match.

This specifically is more lenient to compositors pushing multiple
.done events ahead of the client replying to them.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3641
2022-03-16 17:38:14 +01:00
Matthias Clasen
df593ee651 Merge branch 'wip/carlosg/im-text-location' into 'main'
gtkimcontextwayland: Add native surface offset to input coordinates

Closes #4668

See merge request GNOME/gtk!4573
2022-03-16 11:54:26 +00:00
Carlos Garnacho
4dcd011486 gtkimcontextwayland: Add native surface offset to input coordinates
We were missing the surface offset (e.g. shadows) at the time of expressing
the text caret location in surface coordinates. Add this offset so the
coordinates are as expected by the compositor.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4668
2022-03-16 09:57:42 +01:00
Matthias Clasen
6fe7e373e2 Merge branch 'gtk/gss-search-delay' into 'main'
searchentry: Make search delay editable

Closes #4133

See merge request GNOME/gtk!4563
2022-03-15 22:40:54 +00:00
Ondřej Míchal
0c3583b4bd searchentry: Make search delay editable
The default search delay of 150ms can be too low at times[0], leading app
developers to add additional delay while handling the search-changed
signal[1].

Based on past work from hugsie[2].

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4133

[0] https://github.com/getting-things-gnome/gtg/issues/281
[1] https://github.com/getting-things-gnome/gtg/pull/587
[2] https://gitlab.gnome.org/GNOME/gtk/-/issues/678
2022-03-15 23:55:10 +02:00
Matthias Clasen
f116efd48e Merge branch 'main' into 'main'
gtkplacessidebar: Prevent calling g_object_unref on null

See merge request GNOME/gtk!4569
2022-03-15 14:37:14 +00:00
Matthias Clasen
8057bee295 Apply 1 suggestion(s) to 1 file(s) 2022-03-15 14:35:09 +00:00
Matthias Clasen
ab330f1efc Merge branch 'wip/jimmac/symbolics-gnome-42-sync' into 'main'
icons: update symbolics

See merge request GNOME/gtk!4571
2022-03-15 14:29:27 +00:00
Carlos Garnacho
e5dc66b10e gtk/main: Fix handling of !owner_events grabs
These are meant to always redirect events to the grabbing surface,
even for other surfaces of the same client. We weren't doing that
(instead letting the event go through unmodified), fix this handling
so GTK sees the events consistenty.
2022-03-15 14:40:49 +01:00
Carlos Garnacho
aa43d97a80 gtk/main: Make coords out of surface when rewriting events for grabs
If a grab is held on a toplevel surface tree, and events happen on a
different surface tree from another toplevel/window group, we rewrite
these events so they look like generated on the window group that
holds the grab, but it missed that coordinates would fail to be
translated, so these would stay unchanged and "pointing" to random
parts of the toplevel that is holding the grab and handling the events.

Since off-surface coordinates are not specially meaningful, and in
fact impossible to obtain in some backends, just fake the coordinates
making it sure that all rewritten events point outside the surface.

The grabbing window will still handle the events, but the coordinates
in these will be harmlessly moot.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4760
2022-03-15 14:29:16 +01:00
Jakub Steiner
bfe193e6e2 icons: update symbolics
- match the metaphors/style updates of gnome 42

See https://gitlab.gnome.org/GNOME/gtk/-/issues/4764
2022-03-15 08:31:26 +01:00
Fina Wilke
08f3acb534 gtkplacessidebar: Prevent calling g_object_unref on null
g_object_unref would be called on a null end_icon when provider_account_status
is CLOUD_PROVIDERS_ACCOUNT_STATUS_IDLE
2022-03-14 22:33:35 +01:00
Matthias Clasen
b6b2682bd6 build: Avoid objcopy on arm
The trickery we do with objcopy and ld to speed up
resource inclusion does not seem to work right on
32bit Arm, so just skip it there.

Fixes: #4757, #4748, #4752
2022-03-14 08:44:09 -04:00
Matthias Clasen
8186cb8bee Merge branch 'wip/chergert/for-main' into 'main'
macos: fit'n'finish fixes for main

See merge request GNOME/gtk!4564
2022-03-12 19:07:41 +00:00
Christian Hergert
9e2357d5f3 macos: clear sorted surfaces when showing file chooser
When showing the native file chooser, we need to ensure we clear the
sorted surfaces in the display so that we don't risk delivering events
correctly on the next frame.
2022-03-11 18:19:44 -08:00
Matthias Clasen
675c8b45b1 Merge branch 'wip/jimmac/legacy-icons-gtk4' into 'main'
icons: add missing legacy fullcolor

See merge request GNOME/gtk!4558
2022-03-09 23:37:26 +00:00
Caolán McNamara
20c41dce80 fix docs for gtk_accessible_update_relation example 2022-03-09 16:24:47 +00:00
Jakub Steiner
a9de385ac5 icons: add missing legacy fullcolor
- relied on in testsuite

See https://gitlab.gnome.org/GNOME/gtk/-/issues/4754
2022-03-09 16:19:16 +01:00
Matthias Clasen
213376ee0a text: Stop blinking when we lose focus
We were looking at GtkWidget:has-focus from
event controller signal handlers here, but
the widget property is only changed after
the event controllers.
2022-03-08 06:06:47 -07:00
Matthias Clasen
1cc100415f focus controller: Update for active window
When the window gains or looses active status,
update the focus controllers status.
2022-03-08 06:06:47 -07:00
Matthias Clasen
d9ad7884e9 window: Update has-focus property
Update the :has-focus property of the focus
widget when the active status of the window
changes.

We change the property after generating the
GDK_CROSSING_ACTIVE crossing events.
2022-03-08 06:05:49 -07:00
Matthias Clasen
a652507b7b Merge branch 'center-layout-setters' into 'main'
gtk: Have GtkCenterLayout hold a reference to its widgets

See merge request GNOME/gtk!4544
2022-03-03 19:38:28 +00:00
Jason Francis
4a2a76c231
gtk: Have GtkCenterLayout hold a reference to its widgets 2022-03-03 14:00:25 -05:00
Bilal Elmoussaoui
e6afe28de5 headerbar: Fix docs 2022-03-03 08:36:33 +00:00
Carlos Garnacho
33db142eab gtkscrolledwindow: Do not try to doubly trigger deceleration
This may come from different sources at around the same time, e.g.
a hold gesture while on overshoot. Avoid doing that if an
animation is already set.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4730
2022-02-28 20:27:43 +01:00
Guido Günther
5dca6dce91 window: Make sure we call gdk_wayland_surface_focus
When using xdg_activation this is responsible for submitting
the activation token / startup id to the compositor.
2022-02-28 16:55:54 +00:00
Benjamin Otte
bffa5dfddd listview: Fix return_if_fail()s 2022-02-26 20:35:44 +01:00
Benjamin Otte
2fe20878c3 flattenlistmodel: Fix indentation 2022-02-26 20:35:44 +01:00
Christian Hergert
f278f3610b macos: fix kinetic scrolling with overshoot
Previously we had issues on macos where the overshoot would keep showing.
To fix this we need to actually use discrete events instead of the
generated deltas from macOS in the scroll wheel case. Additionally, we need
to drop the kinetic momentum events from macOS and rely on the gtk kinetic
events which are already happening anyway. We also need to submit the
is_stop event for the GDK_SCROLL_SMOOTH case when we detect it.

To keep the discrete scroll events correct, we need to alter the hack in
gtkscrolledwindow.c to use the same path as other platforms except for
when a smooth scroll event is in place. In the future, I would imagine that
this falls into the boundary of high-precision scrolling and would share
the same code paths as other platforms.

With all of these in place, kinetic scrolling with overshoot appears the
same on macOS as other platforms.
2022-02-24 18:58:48 -08:00
Emmanuele Bassi
226f0e0567 Remove unnecessary warning
Unexporting the window handle on X11 is a no-op, so there's no need
to emit a warning.
2022-02-24 02:04:06 +00:00
Christian Hergert
b4b282dc81 macos: fix allocation for filechoosernative filter
The GtkFileCHooserNativeQuartz injects a NSComboBox into the NSSavePanel
(which is displayed in a remote process since 10.15 whether or not you are
a sandboxed application). The style has changed and we need more space
here to not clip part of the combobox out of view.

I tried every size from 22 to 30 and this seemed to look the most natural
without skewing the location of the text within the combobox.
2022-02-22 11:53:33 -08:00
Matthias Clasen
d4d328f96f Merge branch 'scale-button-empty-icon-list' into 'main'
Don't crash when updating the icon on a `GtkScaleButton` with a non-`NULL` empty icon list

See merge request GNOME/gtk!4475
2022-02-22 19:39:32 +00:00
Matthias Clasen
553eb55f8a Merge branch 'wip/hadess/app-id-inspector-4' into 'main'
inspector: Show app ID and resource path in the General tab

See merge request GNOME/gtk!4493
2022-02-22 19:37:36 +00:00