summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gdk/vulkancontext: Don't create swapchain upfrontgbsneto/vulkan-surface-managementGeorges Basile Stavracas Neto2023-04-091-3/+0
| | | | | We now create and destroy swapchains and surfaces as needed, so no need to create the swapchain when initializing the context.
* gdk/vulkancontext: Recreate swapchain when mapping surfaceGeorges Basile Stavracas Neto2023-04-091-0/+49
| | | | | | | | | | | | | | | | | | | | Right now, we create a VkSurface from either an X11 window, or a Wayland wl_surface, when creating the GdkVulkanContext from a GdkSurface. That works when initially creating it, however, these days, hiding a GdkSurface may destroy the wl_surface or X window too. Sadly, GdkVulkanContext doesn't react to that, and keeps using the same VkSurface that now points to a non-existent object. Connect to the surface's 'notify::mapped' signal, and either destroy the VkSurface and VkSwapchain when the surface is unmapped, or recreate them when the surface is mapped. This ensures the VkSurface is always pointing to a valid native surface. Future commits may reorganize how it all fits together, but at the very least, this commit allows us to use and test the Vulkan renderer without crashing too often.
* Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2023-04-093-14/+17
|\ | | | | | | | | gtk-demo: Add a keyword See merge request GNOME/gtk!5805
| * gtk-demo: Stop using gtk_widget_get_allocationMatthias Clasen2023-04-092-13/+16
| |
| * gtk-demo: Add a keywordMatthias Clasen2023-04-091-1/+1
|/ | | | Make the demo using the 'bluroverlay' come up when you type 'blur'.
* Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2023-04-093-13/+9
|\ | | | | | | | | range: Fix a copy-paste error See merge request GNOME/gtk!5803
| * placessidebar: Stop using gtk_widget_get_allocationMatthias Clasen2023-04-091-4/+4
| |
| * coloreditor: Stop using gtk_widget_get_allocationMatthias Clasen2023-04-091-8/+4
| |
| * range: Fix a copy-paste errorMatthias Clasen2023-04-091-1/+1
|/ | | | | This was showing up as the alpha popup in the color editor not being positioned correctly.
* Merge branch 'gbsneto/vulkan-glyph-fixes' into 'main'Benjamin Otte2023-04-096-58/+53
|\ | | | | | | | | Vulkan glyph fixes See merge request GNOME/gtk!5802
| * gsk/vulkan/glyphcache: Rework glyphsGeorges Basile Stavracas Neto2023-04-082-18/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation of the glyph cache deals with atlases by padding them with 1 pixel at the beginning, at the end, and between each glyph. That's cool and all, however, there's a very subtle problem with this approach: the contents of the atlas are garbage, so this padding is filled with garbage memory! Rework the Vulkan glyph cache to draw each and every glyph in a surface that has 1 pixel border of padding around it. Ensure the surface is completely black by drawing a rectangle before handing it to Pango to draw the glyph. Update tx and ty to pick the texture position adjusted to the 1 pixel padding. The atlas now starts at position (0, 0), since each glyph individually contains its own padding. To improve legibility, add a PADDING define and use it everywhere.
| * gsk/vulkan/pipeline: Simplify pipeline creationGeorges Basile Stavracas Neto2023-04-082-26/+4
| | | | | | | | Nothing uses gsk_vulkan_pipeline_new_full() anymore.
| * gsk/vulkan: Use default blend factorsGeorges Basile Stavracas Neto2023-04-082-4/+2
| | | | | | | | | | | | | | | | | | | | Vulkan renders text using VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA and VK_BLEND_FACTOR_SRC_ALPHA, but that implies per-channel alpha blending, which currently produces the wrong results when blending glyphs with the images beneath them. Use the default pipeline constructors, which implies using the ONE and ONE_MINUS_SRC_ALPHA.
| * gsk/vulkan: CosmeticsGeorges Basile Stavracas Neto2023-04-082-10/+10
|/ | | | Reorder code to match the order used in shaders.
* Merge branch 'wip/carlosg/popover-ungrab-on-unmap' into 'main'Matthias Clasen2023-04-071-8/+6
|\ | | | | | | | | | | | | gtkpopover: Move GTK grabs to map/unmap Closes #5730 See merge request GNOME/gtk!5801
| * gtkpopover: Move GTK grabs to map/unmapCarlos Garnacho2023-04-071-8/+6
|/ | | | | | | | | | | | | | | Typically, a popover gets mapped when shown and unmapped when hidden. A situation there that breaks is where the popover gets recursively unmapped/unrealized when its root is destroyed. In that situation, the popover does however unmap (without being hidden first), moving the GTK grab from show/hide to map/unmap will handle the previous situations, plus this one. Fixes things being unclickable if e.g. a modal dialog got a popover popped up, then got closed via Alt-F4. Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5730
* Merge branch 'inspector-action-fixes' into 'main'Matthias Clasen2023-04-0710-149/+345
|\ | | | | | | | | actionmuxer: Make the compiler warn See merge request GNOME/gtk!5800
| * inspector: Redo the actions listMatthias Clasen2023-04-072-37/+249
| | | | | | | | | | Make the actions list implement GtkActionObserver for the muxer case, and make updates work.
| * inspector: Simplify the action editorMatthias Clasen2023-04-072-81/+22
| | | | | | | | | | No need to listen for changes, the actions list code will do so and tell us to update.
| * inspector: Add ActionHolder::changedMatthias Clasen2023-04-072-1/+18
| | | | | | | | | | We will use this signal to communicate action changes to the action list widgetry.
| * inspector: CosmeticsMatthias Clasen2023-04-071-14/+10
| | | | | | | | | | Make the variant editor use a checkbutton instead of a togglebutton.
| * actionmuxer: Add a preconditionMatthias Clasen2023-04-071-0/+2
| | | | | | | | | | This helps with debugging the inspectors action handling.
| * inspector: Be more carefulMatthias Clasen2023-04-071-4/+10
| | | | | | | | | | Tweak the variant-editor code to handle some cases more explicitly.
| * inspector: Plug a memory leakMatthias Clasen2023-04-071-0/+2
| |
| * inspector: Be safer when handling actionsMatthias Clasen2023-04-072-11/+30
| | | | | | | | | | | | Those query apis are serious about not ignoring their return value, and may not set their our arguments to anything if they return FALSE.
| * actionmuxer: Make the compiler warnMatthias Clasen2023-04-071-1/+1
| | | | | | | | | | | | Warn when the boolean return isn't used, since we may not initialize the out arguments in the FALSE case (see the previous commits).
| * textview: Handle a return valueMatthias Clasen2023-04-071-1/+2
| |
* | Update Bulgarian translationAlexander Shopov2023-04-071-1252/+2
|/ | | | (cherry picked from commit f15aa82eaf4a8d9498b53e3e416d2ac21d6b24f4)
* Merge branch '5729_fix_inspector_crash' into 'main'Matthias Clasen2023-04-071-8/+6
|\ | | | | | | | | | | | | inspector: fix crash caused by uninitialized GVariant Closes #5729 See merge request GNOME/gtk!5799
| * inspector: fix crash caused by uninitialized GVariantNelson Benítez León2023-04-061-8/+6
| | | | | | | | | | | | | | | | | | | | we were not checking the return gboolean of gtk_action_muxer_query_action() which was returning FALSE for the crash case, meaning it didn't set the passed in GVariant, but we were still using it as it was non-null. Fixes #5729
* | Merge branch 'media-controls' into 'main'Matthias Clasen2023-04-063-2/+12
|\ \ | | | | | | | | | | | | mediacontrols: Add tooltip text to play button See merge request GNOME/gtk!5794
| * | mediacontrols: Add tooltip text to play buttonMaximiliano Sandoval R2023-04-063-2/+12
| |/ | | | | | | This makes the button accessible.
* | Merge branch 'alert_dialog_role_mapping_fix' into 'main'Matthias Clasen2023-04-061-1/+1
|\ \ | | | | | | | | | | | | a11y: Map GTK_ACCESSIBLE_ROLE_ALERT_DIALOG to ATSPI_ROLE_ALERT See merge request GNOME/gtk!5796
| * | a11y: Map GTK_ACCESSIBLE_ROLE_ALERT_DIALOG to ATSPI_ROLE_ALERTLukáš Tyrychtr2023-04-061-1/+1
| |/ | | | | | | | | By doing this, alert dialogs will be read automatically, or at least they should be, because a screen reader know that these are special.
* | Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2023-04-061-1/+8
|\ \ | |/ |/| | | | | glarea: Fix property notification See merge request GNOME/gtk!5797
| * glarea: Fix property notificationMatthias Clasen2023-04-061-1/+8
|/ | | | This was broken in 9c26262e3e083006.
* Merge branch 'wip/exalm/centerlayout-shrink' into 'main'Matthias Clasen2023-04-054-10/+240
|\ | | | | | | | | centerlayout/box: Add :shrink-center-last See merge request GNOME/gtk!5790
| * centerbox: Expose GtkCenterLayout:shrink-center-lastAlexander Mikhaylenko2023-04-052-9/+101
| |
| * centerlayout: Add :shrink-center-lastAlexander Mikhaylenko2023-04-052-1/+139
| | | | | | | | | | | | | | Allow to prioritize start and end children and have them keep their natural size instead of center child if possible. See https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5552#note_1708864
* | Merge branch 'wip/exalm/shortcuts' into 'main'Matthias Clasen2023-04-0511-0/+46
|\ \ | | | | | | | | | | | | Add style classes to standard dialogs See merge request GNOME/gtk!5791
| * | pagesetupunixdialog: Add "pagesetup" style classAlexander Mikhaylenko2023-04-062-0/+8
| | |
| * | fontchooserdialog: Add "fontchooser" style classAlexander Mikhaylenko2023-04-062-0/+8
| | |
| * | filechooserdialog: Add "filechooser" style classAlexander Mikhaylenko2023-04-062-0/+8
| | |
| * | colorchooserdialog: Add "colorchooser" style classAlexander Mikhaylenko2023-04-062-0/+8
| | |
| * | appchooserdialog: Add "appchooser" style classAlexander Mikhaylenko2023-04-062-0/+8
| | |
| * | shortcutswindow: Add "shortcuts" style classAlexander Mikhaylenko2023-04-061-0/+6
| |/
* | Merge branch 'ebassi/listbox-dispose' into 'main'Matthias Clasen2023-04-051-14/+16
|\ \ | |/ |/| | | | | listbox: Unbind the model before removing children See merge request GNOME/gtk!5789
| * listbox: Unbind the model before removing childrenEmmanuele Bassi2023-04-041-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling gtk_list_box_remove_all() is a no-op with a bound model; after the introduction of the remove_all() method in 49e56fc7, we were left with row widgets after the dispose() call chained up. We could restore the explicit unparenting inside dispose() instead of calling remove_all(), but since the bound list model is provided by the user of GtkListBox, it's more appropriate to unbind it in the dispose() implementation, to avoid any potential reference cycle (especially in higher level languages that have no explicit reference acquisition). We clean up the bound model, and its associated state, if any; and then we remove all the row widgets that are left.
* | Merge branch 'glarea-allowed-apis' into 'main'Matthias Clasen2023-04-044-22/+159
|\ \ | | | | | | | | | | | | | | | | | | glarea: Add GtkGLArea::allowed-apis Closes #5330 See merge request GNOME/gtk!5786
| * | gtk-demo: Update the GLArea examplesMatthias Clasen2023-04-032-9/+3
| | |