Commit Graph

75886 Commits

Author SHA1 Message Date
Benjamin Otte
d798372a53 Merge branch 'wip/otte/for-main' into 'main'
x11: Remove commented outdated code

See merge request GNOME/gtk!5827
2023-04-13 15:34:48 +00:00
Benjamin Otte
cfaf1b3e71 x11: Remove commented outdated code
... and it's copy/paste into the win32 backend
2023-04-13 17:15:35 +02:00
Benjamin Otte
9763d83a9d gdk: Remove unused vfunc 2023-04-13 17:15:35 +02:00
Benjamin Otte
5f82a496cb Merge branch 'wip/otte/wl-gloria-gaynor' into 'main'
wayland: Make wl_surface survive until surface is desstroyed

See merge request GNOME/gtk!5825
2023-04-13 15:12:07 +00:00
Matthias Clasen
0c35015c44 Merge branch 'wip/exalm/print-dialog' into 'main'
printunixdialog: Remove a redundant style class

See merge request GNOME/gtk!5823
2023-04-13 05:39:08 +00:00
Matthias Clasen
3da0572078 openuriportal: Detect if the interface isn't there
Check the portal version number before trying to use
it. Most importantly, this will detect the case where
the interface isn't supported at all, since the proxy
will report a version of 0 in that case.

Fixes: #5733
2023-04-13 07:24:38 +02:00
Matthias Clasen
c649d8a4ec Merge branch 'bilelmoussaoui/g-i' into 'main'
g-i: Fix GtkGLArea type name

See merge request GNOME/gtk!5824
2023-04-13 04:37:45 +00:00
Benjamin Otte
75bea01a86 wayland: Keep EGL window around when hidden
See previous commit:

We want to keep resources around as long as the surface exists.
2023-04-13 05:19:18 +02:00
Benjamin Otte
5d3cec5441 wayland: Don't destroy the wl_surface on hide()
We want to keep the wl_surface around, because surfaces create their
resources on construct and keep them until destroyed. See the HWND ond
Windows and the XWindow on X11.

This is relevant for graphics resources, where we want to have access
to the VkSurface and eglSurface while the GdkSurface is hidden.
We also want these surfaces to be permanent and not change during the
lifetime of the GdkSurface.

What we can - and must - destroy however are the xdg surfaces, because
those handle visibility on screen.
And we also need to ensure no buffer is attached, so that during the
next creation of the xdg surface we don't get a protocol error.
2023-04-13 04:23:35 +02:00
Benjamin Otte
891242920e wayland: Split out a function
We have a create_wl_surface(), create a matching destroy_wl_surface().
2023-04-13 02:56:12 +02:00
Benjamin Otte
b375f17f09 wayland: Remove useless function
gdk_wayland_surface_maybe_resize() just calls
gdk_wayland_surface_update_size(), so make all callers call that one
instead.

The check that it does is done by the other function again.
2023-04-13 02:48:47 +02:00
Benjamin Otte
ec69990126 wayland: Remove an old workaround
This workaround - were it ever to trigger - is broken today. It destroys
the wl_surface and all associated structs but does not recreate the
xdg_popup or xdg_toplevel struct, so it would cause a hidden window.

The workaround looked a lot different when it was introduced in commit
83b54bab57, too - both in what it did and
in what the vfuncs did that it called.
2023-04-13 02:44:05 +02:00
Bilal Elmoussaoui
aec5a5739e g-i: Fix GtkGLArea type name 2023-04-12 18:12:40 +00:00
Alexander Mikhaylenko
ac9e0039b8 printunixdialog: Remove a redundant style class
.view does absolutely nothing in Default style since the whole box is
covered with a GtkNotebook which has its own background, and adds an
unwanted background onto the tab strip in Adwaita.
2023-04-12 21:09:25 +04:00
Matthias Clasen
4574b21fd6 Merge branch 'dialogs-force-window-destruction' into 'main'
gtk/dialogs: Destroy the window promptly on finish async function

Closes #5741

See merge request GNOME/gtk!5820
2023-04-12 13:54:13 +00:00
Marco Trevisan (Treviño)
31c5961c4f gtk/dialogs: Destroy the window promptly on finish async function
Some bindings (GJS!) could add temporary references to the GAsyncResult
argument that we return, and thus to the GTask, which may cause the
dialog not to close when the finish function is called (but at garbage
collection instead!).

To prevent this, just manually destroy the window (by removing the task
data), so that we are not bound to the GTask lifetime anymore.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5741
2023-04-12 15:39:39 +02:00
Matthias Clasen
8fc3f06155 Merge branch 'filechooserentry-fixes' into 'main'
filechooserentry: Make filtering work again

Closes #5743

See merge request GNOME/gtk!5822
2023-04-12 10:38:04 +00:00
Matthias Clasen
5327203201 Merge branch 'wip/carlosg/multi-click-text-view' into 'main'
textview: Reset press counter if double/triple clicking on a different line

See merge request GNOME/gtk!5821
2023-04-12 10:11:16 +00:00
Matthias Clasen
8442fce962 Merge branch 'touch-no-double-click-threshold' into 'main'
gestureclick: Don't use threshold for touch

Closes #5580

See merge request GNOME/gtk!5798
2023-04-12 10:10:31 +00:00
Matthias Clasen
d8b46c16cc Merge branch 'stylus-fixes' into 'main'
gtk-demo: Test stylus-only mode

See merge request GNOME/gtk!5804
2023-04-12 10:10:11 +00:00
Matthias Clasen
4df7273266 filechooserentry: Plug a memory leak 2023-04-12 12:09:02 +02:00
Matthias Clasen
2b8fd89fd5 filechooserentry: Make filtering work again
We need to look at the filchooser::filtered-out
attribute to know which files the filesystem model
has filtered away.

Fixes: #5743
2023-04-12 12:08:43 +02:00
Carlos Garnacho
5b9a7863cf textview: Reset press counter if double/triple clicking on a different line
If we click close enough between lines, and with the maximum distances applied
by GtkGestureClick we could jump between lines when handling double/triple
click for word/line selection.

Ensure that the whole operation stays in the same line and reset the
gesture/counter if we do move between lines, so we start from scratch in the
new line.
2023-04-12 11:27:41 +02:00
G.Willems
d625ff8106 scalebutton: fix orientation not applied to scale 2023-04-11 23:54:06 +02:00
G.Willems
5ecd8a1c10 scalebutton: fix CSS name in documentation 2023-04-11 22:06:54 +02:00
Matthias Clasen
e9f7a9b8e6 Merge branch 'matthiasc/for-main' into 'main'
filechooser: Fix the gridview

See merge request GNOME/gtk!5817
2023-04-11 06:10:56 +00:00
Matthias Clasen
93b1130c07 filechooser: Fix the gridview
2a70093a30 was a bit overeager in its porting
to GtkColumnViewCell. The gridview needs to keep its
list items.
2023-04-11 07:41:09 +02:00
Matthias Clasen
db48cd6467 Merge branch 'wip/corey/file-chooser-widget' into 'main'
More fixes to filechooserwidget

See merge request GNOME/gtk!5815
2023-04-11 05:32:38 +00:00
Matthias Clasen
ba43a126b9 Merge branch 'wip/corey/filesystemmodel' into 'main'
filesystemmodel: Notify correct position removed in remove_file()

See merge request GNOME/gtk!5814
2023-04-11 05:27:24 +00:00
Corey Berla
2a70093a30 filechooser: Set date and time after cell is a child of filechooserwidget
The date/time column relies on the filechooserwidget to format the date
properly.  During bind, the filechoosercell, get the filechooserwidget
ancestor, but now due to changes in the listview, the cell isn't a
child of the filechooserwidget at that point.  Since this is deeply
ingrained into the filechooserwidget, let's keep the same behavior,
but move it to filechoosercell in realize.  Alternatively, we could have
used a signal factory (with the file chooser widget as the user data),
but that would have been a major overhaul.
2023-04-10 18:02:35 -07:00
Corey Berla
dd407dab00 filechoosercell: Store type_format in filechoosercell
The format of the type column depends on the the type_format, which
is stored in the filechooserwidget.  We get that setting by looking
for the filechooserwidget ancestor, which no longer works after recent
changes to the list views (it was fragile to begin with).  At one point,
the setting appears to have been dynamic, but now it is only loading
from GSettings, so let's simply do the same within FileChooserCell.
2023-04-10 18:02:35 -07:00
Corey Berla
ccae75022b filechooserwidget: Finish port to GtkColumnViewCell
Some missing updates from f5dea9a3c2
2023-04-10 18:02:24 -07:00
Corey Berla
faac2f7894 filesystemmodel: Notify correct position removed in remove_file()
32247bc50e made several changes to account for the
fact that we no longer have a NULL editable at the beginning of the list
model.  The commit mistakenly left out one change in remove_file(),
which causes the wrong file to be removed.
2023-04-10 12:56:08 -07:00
Matthias Clasen
d00b78d283 Merge branch 'matthiasc/for-main' into 'main'
node-editor: Typo fixes

See merge request GNOME/gtk!5812
2023-04-10 14:28:38 +00:00
Matthias Clasen
3eee1c0724 node-editor: Typo fixes
Fix some typos in the node format documentation.
2023-04-10 16:04:17 +02:00
Matthias Clasen
5e6bc681a3 Merge branch 'scrolled-window-critical' into 'main'
scrolledwindow: Avoid a critical

See merge request GNOME/gtk!5809
2023-04-10 05:50:20 +00:00
Matthias Clasen
87e16f3ad9 testsuite: Check widget properties better
Check that setting a property after resetting
it works. An instance of this was fixed in the
previous commit.
2023-04-10 00:24:57 -04:00
Matthias Clasen
aa9e83876d scrolledwindow: Avoid a critical
When setting the child property to NULL, we also need
to unset auto_added_viewport, to avoid triggering a
critical when setting it again.
2023-04-10 00:22:20 -04:00
Matthias Clasen
d8796b3075 Merge branch 'warn-show-destoyed-window' into 'main'
Show a warning when a destroyed window is shown

See merge request GNOME/gtk!5122
2023-04-09 20:16:52 +00:00
Matthias Clasen
cefd720789 Merge branch 'matthiasc/for-main' into 'main'
gtk-demo: Add a keyword

See merge request GNOME/gtk!5805
2023-04-09 13:02:55 +00:00
Matthias Clasen
d4a34b1a0b gtk-demo: Stop using gtk_widget_get_allocation 2023-04-09 08:38:14 -04:00
Matthias Clasen
b7f48b7763 gtk-demo: Add a keyword
Make the demo using the 'bluroverlay' come up when you type 'blur'.
2023-04-09 08:38:14 -04:00
Matthias Clasen
61a0d06310 Merge branch 'matthiasc/for-main' into 'main'
range: Fix a copy-paste error

See merge request GNOME/gtk!5803
2023-04-09 12:37:44 +00:00
Matthias Clasen
e12669e230 gesture stylus: Fix condition
Now that the paint demo lets us test this, it has
become apparent that this condition is wrong, and
we don't get the expected events if stylus-only is
FALSE.
2023-04-09 08:35:03 -04:00
Matthias Clasen
7f906bef06 gtk-demo: Work without stylus
In the paint demo, don't assume that the event
backlog contains pressure. It won't, if we are
working with a plain old mouse.
2023-04-09 08:35:03 -04:00
Matthias Clasen
5970a14217 gtk-demo: Test stylus-only mode
Add a checkbutton to toggle the stylus-only
mode of GtkGestureStylus, so we can test this.
2023-04-09 08:35:03 -04:00
Matthias Clasen
34b6d46276 placessidebar: Stop using gtk_widget_get_allocation 2023-04-09 06:48:27 -04:00
Matthias Clasen
8957d4cb4f coloreditor: Stop using gtk_widget_get_allocation 2023-04-09 06:48:27 -04:00
Matthias Clasen
95f5c7beb6 range: Fix a copy-paste error
This was showing up as the alpha popup in
the color editor not being positioned correctly.
2023-04-09 06:48:27 -04:00
Benjamin Otte
3907711a49 Merge branch 'gbsneto/vulkan-glyph-fixes' into 'main'
Vulkan glyph fixes

See merge request GNOME/gtk!5802
2023-04-09 00:07:16 +00:00