Commit Graph

73929 Commits

Author SHA1 Message Date
Matthias Clasen
f658027c51 Merge branch 'fix-editable-label-spurious-focus-out' into 'main'
window: Keep a reference to move_focus_widget

Closes #4864

See merge request GNOME/gtk!5134
2022-10-18 19:45:19 +00:00
Matthias Clasen
7be993b728 editablelabel: Defer changes on focus-out
We can get spurious focus-out/-in pairs when
the editable label is in a popover that gets
a Wayland keyboard enter event as a result of
clicking the editable label.

A timeout isn't a great solution, but nothing
better is available right now.

Fixes: #4864
2022-10-18 14:23:22 -04:00
Matthias Clasen
e1d78821f6 window: Keep a reference to move_focus_widget
If we don't take a reference, it can happen that
the pointer is no longer valid by the time we
dereference it in after_paint.
2022-10-18 14:23:11 -04:00
Matthias Clasen
94ac1af293 Merge branch 'fix-focus-changes' into 'main'
window: Fix focus updates

Closes #4903

See merge request GNOME/gtk!5127
2022-10-18 11:02:08 +00:00
Matthias Clasen
b4db48935d Merge branch 'fix-windows-build-testmountoperation' into 'main'
tests/testmountoperation.c: Fix build on Windows

See merge request GNOME/gtk!5126
2022-10-18 10:53:21 +00:00
Matthias Clasen
f5063c1435 window: Don't focus invisible widgets
Only clear a queued move_focus if the widget
we are focusing is actually visible.

This was happening in some cases when popovers
are dismissed by clicking outside, and it was
causing us to miss proper focus updates that
were already queued.
2022-10-18 06:42:17 -04:00
Benjamin Otte
8092a6858e Merge branch 'bilelmoussaoui/gi-deprecated' into 'main'
g-i: Fix deprecated version of GtkTreeView

See merge request GNOME/gtk!5131
2022-10-18 09:53:53 +00:00
Bilal Elmoussaoui
0fbaeaabd0 g-i: Fix deprecated version of GtkTreeView 2022-10-18 11:27:39 +02:00
Luca Bacci
995f00d23f Merge branch 'forward-port-mr-991-to-gtk4-2' into 'main'
Use native Windows API for converting keystrokes to characters

Closes #2944

See merge request GNOME/gtk!4986
2022-10-17 19:20:08 +00:00
Matthias Clasen
100605ef0c window: Fix focus updates
This partially undoes changes from 3dbf5038fa.

That commit did two things:
1) Move the focus update to after-paint time
2) Change from grabbing focus to the visible parent
   to  calling move_focus (TAB)

The second part did have the unintended consequence
of moving focus laterally.

Fixes: #4903
2022-10-17 15:10:41 -04:00
Benjamin Otte
1246cd5e73 Merge branch 'wip/otte/for-main' into 'main'
singleselection: Be more careful about notifies

See merge request GNOME/gtk!5129
2022-10-17 18:34:40 +00:00
Benjamin Otte
f30e59fed9 dropdown: Handle ::selected and ::selected-item separately
GtkSingleSelection will only emit either of those signals if they
change. But it is possible that only one of those properties changes,
and in those cases we want to only notify for that property changing in
the dropdown, too.
2022-10-17 20:11:27 +02:00
Benjamin Otte
5e8b294faf singleselection: Be more careful about notifies
We don't want to notify::selected or notify::selected-item if they
didn't change.
This will bring performance benefits on frequently changing lists.

In particular, if lists get filtered or reordered, but the selected item
stays in the list, not doing a notify::selected-item will avoid updates
in connected handlers like GtkDropdown (and its handlers), thereby
avoiding lots of unnecessary updates.
2022-10-17 20:11:27 +02:00
Philip Zander
c84c469b78 Use native Windows API for converting keystrokes to characters 2022-10-17 19:36:48 +02:00
Chun-wei Fan
1a5a65acd0 tests/testmountoperation.c: Fix build on Windows
Sadly, we can't just use an interger for a GPid on Windows, so just cast
it.  Sounds silly for non-Windows, but that's life...
2022-10-17 12:36:17 +08:00
Matthias Clasen
6f5d18a9f5 macos: Fix clipboard data size handling
We were using the allocated memory size, not
the amount of data that has been written.

Fixes: #5261
2022-10-16 23:45:28 -04:00
Matthias Clasen
004f22a51c Merge branch 'matthiasc/for-main' into 'main'
Rename gtk_widget_get_style_color

See merge request GNOME/gtk!5125
2022-10-17 03:26:21 +00:00
Matthias Clasen
d775caff7f Rename gtk_widget_get_style_color
This name wasn't everybody's favorite, so go with
the generic name gtk_widget_get_color() instead.
2022-10-16 21:41:43 -04:00
Piotr Drąg
baf3a3eecd Update POTFILES.in 2022-10-16 14:34:34 +02:00
Benjamin Otte
ca2e14788d Merge branch 'antoniof-main-patch-03677' into 'main'
columnview: Don't be focusable

See merge request GNOME/gtk!5022
2022-10-14 22:39:49 +00:00
Matthias Clasen
c57d8fc6be Merge branch 'gtk_widget_get_style_color-docs-fix' into 'main'
Fix documentation for `gtk_widget_get_style_color()`

See merge request GNOME/gtk!5119
2022-10-14 10:49:15 +00:00
Sebastian Dröge
294e5bb79f Fix documentation for gtk_widget_get_style_color()
It was pointing at `gtk_widget_get_css_style()` instead.
2022-10-14 12:36:11 +03:00
Matthias Clasen
bde19f9b2a Fix blank popovers
This was a typo in 2b00b64e8c, making
us render the background on the wrong snapshot.
2022-10-13 16:38:41 -04:00
Matthias Clasen
1d2071b892 NEWS: Updates 2022-10-12 23:27:36 -04:00
Matthias Clasen
b46eb5c20a Merge branch 'matthiasc/for-main' into 'main'
filechooser: Update the settings docs

See merge request GNOME/gtk!5118
2022-10-13 03:09:47 +00:00
Matthias Clasen
3d605615ce filechooser: Update the settings docs
Document the window-position setting as unused.
2022-10-12 22:47:51 -04:00
Matthias Clasen
c502d7fca6 Merge branch 'matthiasc/for-main' into 'main'
docs: Add a cross-reference

See merge request GNOME/gtk!5117
2022-10-13 02:43:48 +00:00
Matthias Clasen
9f8abc5d74 docs: Add a cross-reference
Note that GtkTreeView is deprecated and link to the
list view introduction from 'Tree and List Widget Overview'.
2022-10-12 22:26:40 -04:00
Matthias Clasen
c8cbb3fbba Merge branch 'matthiasc/for-main' into 'main'
filechooserentry: Add a set_text api

See merge request GNOME/gtk!5116
2022-10-13 02:25:19 +00:00
Matthias Clasen
fa3c8ed5f9 filechooser: Stop using entrycompletion api
The file chooser entry now has an api for this.
2022-10-12 21:59:35 -04:00
Matthias Clasen
8ac5f1983e filechooserentry: Add a set_text api
This function prevents the completion popup
from coming up when setting the entry text.
2022-10-12 21:59:19 -04:00
Matthias Clasen
eccc02d084 Merge branch 'matthiasc/for-main' into 'main'
Start a migration guide for GTK 5

See merge request GNOME/gtk!5114
2022-10-12 21:02:56 +00:00
Matthias Clasen
0c94db7147 Start a migration guide for GTK 5
No need to panic, GTK 5 is still years away!
But it is good to write this material down while
it is fresh in mind.
2022-10-12 16:39:28 -04:00
Matthias Clasen
ed87473bf9 Merge branch 'deprecate-render' into 'main'
wip: Deprecate gtk_render apis

See merge request GNOME/gtk!5100
2022-10-12 20:38:19 +00:00
Matthias Clasen
812a879ec2 inspector: Use gtk_widget_get_style_color
The graph renderer in the statistics page needs
the CSS foreground color to draw the graph. Use
the just introduced api for it.
2022-10-12 15:35:00 -04:00
Matthias Clasen
5627542d7c Add gtk_widget_get_style_color
There is a widespread need to access the CSS foreground
color for custom drawing in snapshot functions, so make
it available after gtk_style_context_get_color was
deprecated with a new widget api.
2022-10-12 15:35:00 -04:00
Matthias Clasen
f42fe500c9 cssnode: Avoid style context api
Duplicate the print flags in gtkcssnodeprivate.h,
so we don't rely on gtkstylecontext.h here.
2022-10-12 15:35:00 -04:00
Matthias Clasen
ac3177ce95 tests: Ignore deprecations
Some of our tests use deprecated style context api.
Most of them should be ported to use global style
providers eventually. For now, ignore deprecations.
2022-10-12 15:35:00 -04:00
Matthias Clasen
ccaaff406f testsuite: Ignore deprecations
Some of our tests use deprecated style context
apis. Ignore the deprecations for now.
2022-10-12 15:35:00 -04:00
Matthias Clasen
b1ec43ae33 demos: Ignore deprecations
Most of these demos should be ported to use
global style providers eventually. For now,
just ignore the deprecations.
2022-10-12 15:35:00 -04:00
Matthias Clasen
ee8c2a235f stylecontext: Deprecate most apis
The notable exception here are the global provider apis,
which are needed in some form and don't have a replacement
yet. Move them to gtkstyleprovider.[hc], so we can wholly
deprecated gtkstylecontext.[hc].
2022-10-12 15:35:00 -04:00
Matthias Clasen
299fbfd722 tests: Ignore deprecations for render api 2022-10-12 15:35:00 -04:00
Matthias Clasen
5f54ecdf2c aboutdialog: Stop using gtk_style_context_save 2022-10-12 15:35:00 -04:00
Matthias Clasen
e09138ce45 textview: Stop using gtk_style_context_save_to_node 2022-10-12 15:35:00 -04:00
Matthias Clasen
a71893f88b text: Stop using gtk_style_context_save_to_node 2022-10-12 15:35:00 -04:00
Matthias Clasen
01324ffaff label: Stop using gtk_style_context_save_to_node 2022-10-12 15:35:00 -04:00
Matthias Clasen
c354465ed8 scrolledwindow: Stop using gtk_style_context_save_to_node 2022-10-12 15:35:00 -04:00
Matthias Clasen
50ab2386ec printunixdialog: Stop using gtk_style_context_save_to_node 2022-10-12 15:35:00 -04:00
Matthias Clasen
bf9f362597 popover: Stop using gtk_style_context_save_to_node 2022-10-12 15:35:00 -04:00
Matthias Clasen
d03ee57cc5 flowbox: Stop using gtk_style_context_save_to_node 2022-10-12 15:35:00 -04:00