gtk4.git
3 years agogtkpopovermenubar: Make model nullable
Kjell Ahlstedt [Fri, 18 Nov 2022 17:09:42 +0000 (18:09 +0100)]
gtkpopovermenubar: Make model nullable

The description of gtk_popover_menu_bar_new_from_model() and
gtk_popover_menu_bar_set_menu_model() says that model is nullable.
Make it so.

3 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Fri, 18 Nov 2022 05:22:44 +0000 (05:22 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

gsk: Add an assertion to help static analysis

See merge request GNOME/gtk!5224

3 years agostringsorter: Fix one case of collation handling
Matthias Clasen [Fri, 18 Nov 2022 04:52:35 +0000 (23:52 -0500)]
stringsorter: Fix one case of collation handling

When not ignoring case, and not collating, we were
returning sort keys that were already freed. Oops.

Pointed out by clang.

3 years agogdk: Fix possible memory errors
Matthias Clasen [Fri, 18 Nov 2022 04:51:28 +0000 (23:51 -0500)]
gdk: Fix possible memory errors

clang complained that we may end up jumping
to the cleanup code without initializing data
in the jpeg code. Always initialize data to
NULL to prevent that eventuality.

3 years agocomposetable: Fix a memory leak
Matthias Clasen [Fri, 18 Nov 2022 04:21:19 +0000 (23:21 -0500)]
composetable: Fix a memory leak

Pointed out by clang.

3 years agogsk: Add an assertion to help static analysis
Matthias Clasen [Fri, 18 Nov 2022 05:02:20 +0000 (00:02 -0500)]
gsk: Add an assertion to help static analysis

clang gets wild ideas about negative radii otherwise.

3 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Fri, 18 Nov 2022 04:56:57 +0000 (04:56 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Fix spelling errors

See merge request GNOME/gtk!5223

3 years agoDrop redundant glib version checks
Matthias Clasen [Thu, 17 Nov 2022 19:16:37 +0000 (14:16 -0500)]
Drop redundant glib version checks

We require GLib 2.72 now.

3 years agogdk: Clean up gdkprivate.h
Matthias Clasen [Thu, 17 Nov 2022 19:01:11 +0000 (14:01 -0500)]
gdk: Clean up gdkprivate.h

Move apis to more specific headers.

3 years agogdk: Rename GDK_SURFACE_TEMP
Matthias Clasen [Thu, 10 Nov 2022 14:36:00 +0000 (15:36 +0100)]
gdk: Rename GDK_SURFACE_TEMP

We use this value only for drag surfaces, so call it that.

3 years agoFix spelling errors
Matthias Clasen [Fri, 18 Nov 2022 03:24:18 +0000 (22:24 -0500)]
Fix spelling errors

These were pointed out by codespell.

3 years agoMerge branch 'file-dialog-portals' into 'main'
Matthias Clasen [Fri, 18 Nov 2022 03:49:30 +0000 (03:49 +0000)]
Merge branch 'file-dialog-portals' into 'main'

file dialog: Use portals

See merge request GNOME/gtk!5221

3 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Thu, 17 Nov 2022 20:53:51 +0000 (20:53 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

gtk-demo: Add some keywords

See merge request GNOME/gtk!5220

3 years agofiledialog: Use portals
Matthias Clasen [Thu, 17 Nov 2022 20:51:11 +0000 (15:51 -0500)]
filedialog: Use portals

We want this new API to be portal-first.
Make it so.

3 years agogtk-demo: Add folders to the clipboard demo
Matthias Clasen [Thu, 17 Nov 2022 11:29:17 +0000 (06:29 -0500)]
gtk-demo: Add folders to the clipboard demo

This is handy for testing a case where folder
dnd does not work with the file transfer portal.

See #5348

3 years agogtk-demo: Add some keywords
Matthias Clasen [Thu, 17 Nov 2022 10:50:34 +0000 (05:50 -0500)]
gtk-demo: Add some keywords

Make sure that dnd and drag-and-drop yield the right
(and the same) set of demos.

3 years agoMerge branch 'ccook/doc-spelling-fixes' into 'main'
Matthias Clasen [Thu, 17 Nov 2022 10:28:38 +0000 (10:28 +0000)]
Merge branch 'ccook/doc-spelling-fixes' into 'main'

doc fix: various spelling mistakes corrected

See merge request GNOME/gtk!5215

3 years agoMerge branch 'win32-hotspot' into 'main'
Luca Bacci [Thu, 17 Nov 2022 09:06:55 +0000 (09:06 +0000)]
Merge branch 'win32-hotspot' into 'main'

gdk/win32: fix cursor hotspot

See merge request GNOME/gtk!5216

3 years agoMerge branch 'main' into ccook/doc-spelling-fixes
Cam Cook [Thu, 17 Nov 2022 04:23:42 +0000 (23:23 -0500)]
Merge branch 'main' into ccook/doc-spelling-fixes

3 years agodoc/spelling changes: gtkselectionmodel.c, 'call this when the* selection changes'
Cam Cook [Thu, 17 Nov 2022 04:20:50 +0000 (23:20 -0500)]
doc/spelling changes: gtkselectionmodel.c, 'call this when the* selection changes'

3 years agoMerge branch 'radioactiveman-main-patch-52462' into 'main'
Matthias Clasen [Thu, 17 Nov 2022 03:46:43 +0000 (03:46 +0000)]
Merge branch 'radioactiveman-main-patch-52462' into 'main'

label: Fix markup doc example

See merge request GNOME/gtk!5201

3 years agolabel: Fix markup doc example
Thomas Lange [Thu, 17 Nov 2022 03:46:01 +0000 (03:46 +0000)]
label: Fix markup doc example

3 years agoMerge branch 'ebassi/list-doc-links' into 'main'
Emmanuele Bassi [Wed, 16 Nov 2022 21:51:59 +0000 (21:51 +0000)]
Merge branch 'ebassi/list-doc-links' into 'main'

docs: Add links to the list widgets table

See merge request GNOME/gtk!5210

3 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Wed, 16 Nov 2022 19:24:54 +0000 (19:24 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Inspector: Add a missing event type

See merge request GNOME/gtk!5218

3 years agoMerge branch 'filechooser-set-choice-fix' into 'main'
Matthias Clasen [Wed, 16 Nov 2022 19:23:05 +0000 (19:23 +0000)]
Merge branch 'filechooser-set-choice-fix' into 'main'

filechooser: Fix gtk_file_chooser_set_choice again

Closes #5346

See merge request GNOME/gtk!5219

3 years agofilechooser: Fix gtk_file_chooser_set_choice again
robxnano [Wed, 16 Nov 2022 18:07:20 +0000 (18:07 +0000)]
filechooser: Fix gtk_file_chooser_set_choice again

If the choice was in the form of a GtkDropDown, the code failed to
find the widget and so the choice never got set. Fixes #5346.

3 years agogdk/win32: fix cursor hotspot
Marc-André Lureau [Wed, 16 Nov 2022 07:42:22 +0000 (11:42 +0400)]
gdk/win32: fix cursor hotspot

This seems to be a regression from commit c06b1cc103b8 "Win32: Re-work cursor handling".

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
3 years agoAlertdialog: Cosmetics
Matthias Clasen [Tue, 15 Nov 2022 10:36:32 +0000 (10:36 +0000)]
Alertdialog: Cosmetics

3 years agoevents: Drop an unused variable
Matthias Clasen [Tue, 15 Nov 2022 10:26:25 +0000 (10:26 +0000)]
events: Drop an unused variable

3 years agoInspector: Add a missing event type
Matthias Clasen [Tue, 15 Nov 2022 06:18:41 +0000 (07:18 +0100)]
Inspector: Add a missing event type

We did not have a name for the new touchpad hold
events.

To prevent this from happening again in the future,
add a static assertion.

3 years agoDocumentation fix: Various spelling mistakes (and one use of the wrong verb) across...
Cam Cook [Sun, 13 Nov 2022 16:55:05 +0000 (11:55 -0500)]
Documentation fix: Various spelling mistakes (and one use of the wrong verb) across a few domains that show up in documentation.

| domain | current | suggestion |
|--------|---------|------------|
| [GtkButton](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkbutton.c#L691)       | "Buttons can has a flat appearance" | "Buttons can have a flat appearance" |
| [GtkCenterBox](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkcenterbox.c#L275) | "pas %NULL" | "pass %NULL" |
| [GtkEditable](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkeditable.c#L466)   | "the text to append" | "the text to insert" |
| [GtkFlowbox](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkflowbox.c#L4921)    | "the are equal" | "they are equal" |
| [GtkSelectionModel](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkselectionmodel.c#L550) | "Call this when a the selection changes" | "Call this when a selection changes" |
| [GtkWIndow](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkwindow.c#L5321)                | "(e.g. the user or the window manager" | "(e.g. the user or the window manager)" |

3 years agodocs: Add more links to the list widgets description
Emmanuele Bassi [Fri, 11 Nov 2022 11:29:08 +0000 (11:29 +0000)]
docs: Add more links to the list widgets description

3 years agodocs: Add links to the list widgets table
Emmanuele Bassi [Fri, 11 Nov 2022 11:21:17 +0000 (11:21 +0000)]
docs: Add links to the list widgets table

Make it easier for readers to go to the appropriate replacement for the
old GtkTreeView-and-friends API.

3 years agoMerge branch 'focus-no-parent' into 'main'
Matthias Clasen [Fri, 11 Nov 2022 10:29:00 +0000 (10:29 +0000)]
Merge branch 'focus-no-parent' into 'main'

focus: fall back to old behaviour if we didn't focus anything

See merge request GNOME/gtk!5189

3 years agoMerge branch 'docs-update' into 'main'
Matthias Clasen [Fri, 11 Nov 2022 10:28:11 +0000 (10:28 +0000)]
Merge branch 'docs-update' into 'main'

docs: Update Common Questions section on list views

See merge request GNOME/gtk!5209

3 years agoFix typo in 4 to 5 migration page
Arjan Molenaar [Thu, 10 Nov 2022 21:36:21 +0000 (22:36 +0100)]
Fix typo in 4 to 5 migration page

3 years agoUpdate Common Questions section on tree views
Arjan Molenaar [Thu, 10 Nov 2022 21:20:07 +0000 (22:20 +0100)]
Update Common Questions section on tree views

Point users to GtkListView instead of the
deprecated GtkTreeView.

3 years agoMerge branch 'gdkwaylandtoplevel' into 'main'
Matthias Clasen [Thu, 10 Nov 2022 13:58:24 +0000 (13:58 +0000)]
Merge branch 'gdkwaylandtoplevel' into 'main'

gdk/wayland/surface: Move more members to `GdkWaylandPopup` and `GdkWaylandToplevel`

See merge request GNOME/gtk!4227

3 years agoMerge branch 'win32-inhibit' into 'main'
Luca Bacci [Thu, 10 Nov 2022 11:18:23 +0000 (11:18 +0000)]
Merge branch 'win32-inhibit' into 'main'

gdk-win32: implement basic inhibit-system-shortcuts

See merge request GNOME/gtk!5206

3 years agoMerge branch 'export-handle-refactor' into 'main'
Matthias Clasen [Thu, 10 Nov 2022 08:00:07 +0000 (08:00 +0000)]
Merge branch 'export-handle-refactor' into 'main'

Refactor surface handle export

See merge request GNOME/gtk!5205

3 years agogdk-win32: implement basic inhibit-system-shortcuts
Marc-André Lureau [Wed, 9 Nov 2022 15:08:11 +0000 (19:08 +0400)]
gdk-win32: implement basic inhibit-system-shortcuts

This is largely adapted from commit 83027c68f112 ("11: Implement
inhibit_system_shortcuts API"), with similar rationale:

    To implement the inhibit_system_shortcuts API on X11, we emulate the
    same behavior using grabs on the keyboard.

    To avoid keeping active grabs on the keyboard that would affect
    other X11 applications even when the surface isn't focused, the X11
    implementation takes care of releasing the grabs as soon as the
    toplevel loses focus.

Note that Windows has low-level keyboard hooks that could help achieve
the expected behaviour. This is implemented by spice-gtk & gtk-vnc for
example, but correctness isn't obvious. I left a TODO comment.

This patch helps implementing remote desktop widgets with GTK4, since
currently on win32 backend Alt-Tab and such are always left to the
system unless there is keyboard grab (which can't be requested by the
client API anymore, afaict).

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
3 years agowayland: Reimplement export_handle
Matthias Clasen [Wed, 9 Nov 2022 15:24:20 +0000 (16:24 +0100)]
wayland: Reimplement export_handle

Reimplement the backend API on top of the new async
calls.

3 years agowindow: fixups
Matthias Clasen [Wed, 9 Nov 2022 15:12:01 +0000 (16:12 +0100)]
window: fixups

3 years agowayland: fixups
Matthias Clasen [Wed, 9 Nov 2022 15:11:52 +0000 (16:11 +0100)]
wayland: fixups

3 years agowayland: Support the v2 protocol in both places
Matthias Clasen [Wed, 9 Nov 2022 11:32:02 +0000 (12:32 +0100)]
wayland: Support the v2 protocol in both places

The old api should better support both versions of the
foreign protocol too.

3 years agowayland: Add zxdg_foreign_v2 protocol support
Matthias Clasen [Wed, 9 Nov 2022 11:22:00 +0000 (12:22 +0100)]
wayland: Add zxdg_foreign_v2 protocol support

3 years agowindow: Use gdk_toplevel_export_handle
Matthias Clasen [Wed, 9 Nov 2022 07:41:55 +0000 (08:41 +0100)]
window: Use gdk_toplevel_export_handle

3 years agoAdd gdk_toplevel_export_handle
Matthias Clasen [Sun, 6 Nov 2022 16:17:02 +0000 (17:17 +0100)]
Add gdk_toplevel_export_handle

This code is backend-specific, and should not live
in gtkwindow.c.

3 years agogdk-win32: fix unused variable warnings
Marc-André Lureau [Wed, 9 Nov 2022 15:18:52 +0000 (19:18 +0400)]
gdk-win32: fix unused variable warnings

../gdk/win32/gdksurface-win32.c: In function 'gdk_win32_get_window_size_and_position_from_client_rect':
../gdk/win32/gdksurface-win32.c:3753:20: warning: unused variable 'impl' [-Wunused-variable]
 3753 |   GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
      |                    ^~~~
../gdk/win32/gdksurface-win32.c: In function 'gdk_win32_surface_get_queued_window_rect':
../gdk/win32/gdksurface-win32.c:5129:20: warning: unused variable 'impl' [-Wunused-variable]
 5129 |   GdkWin32Surface *impl = GDK_WIN32_SURFACE (surface);

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
3 years agoMerge branch 'wayland_display_geometry' into 'main'
Matthias Clasen [Tue, 8 Nov 2022 16:29:15 +0000 (16:29 +0000)]
Merge branch 'wayland_display_geometry' into 'main'

wayland: calculate union of geometry of all monitors for toplevel bounds

See merge request GNOME/gtk!4790

3 years agoMerge branch 'cursor-size' into 'main'
Matthias Clasen [Tue, 8 Nov 2022 16:27:06 +0000 (16:27 +0000)]
Merge branch 'cursor-size' into 'main'

GtkSettings: Provide settings in logical pixels also on X11

Closes #5223 and #5230

See merge request GNOME/gtk!5172

3 years agoMerge branch 'wip/carlosg/back-forward-mask' into 'main'
Matthias Clasen [Tue, 8 Nov 2022 16:14:18 +0000 (16:14 +0000)]
Merge branch 'wip/carlosg/back-forward-mask' into 'main'

gdk/wayland: Fix button mask calculation on button events

Closes #5301

See merge request GNOME/gtk!5191

3 years agoMerge branch 'add-link-to-docs' into 'main'
Matthias Clasen [Tue, 8 Nov 2022 16:05:59 +0000 (16:05 +0000)]
Merge branch 'add-link-to-docs' into 'main'

Link the file mentioned as a reference for key values

See merge request GNOME/gtk!5198

3 years agoMerge branch 'ebassi/since-for-main' into 'main'
Matthias Clasen [Tue, 8 Nov 2022 16:01:11 +0000 (16:01 +0000)]
Merge branch 'ebassi/since-for-main' into 'main'

docs: Add deprecation notices for properties

See merge request GNOME/gtk!5204

3 years agoMerge branch 'ccook/gtk_aspect_frame_doc_fix' into 'main'
Matthias Clasen [Tue, 8 Nov 2022 15:28:08 +0000 (15:28 +0000)]
Merge branch 'ccook/gtk_aspect_frame_doc_fix' into 'main'

doc/comment fix: @self misspelled as self@

See merge request GNOME/gtk!5200

3 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Tue, 8 Nov 2022 15:23:03 +0000 (15:23 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Add new printf patterns to make-pot

See merge request GNOME/gtk!5188

3 years agodocs: Add deprecation notices for properties
Emmanuele Bassi [Tue, 8 Nov 2022 10:45:00 +0000 (10:45 +0000)]
docs: Add deprecation notices for properties

3 years agoMerge branch 'fix-color-dialog-button-new' into 'main'
Matthias Clasen [Mon, 7 Nov 2022 14:51:34 +0000 (14:51 +0000)]
Merge branch 'fix-color-dialog-button-new' into 'main'

colordialogbutton: Actually accept NULL

Closes #5321

See merge request GNOME/gtk!5202

3 years agogtk-demo: Improve language handlng
Matthias Clasen [Wed, 2 Nov 2022 11:04:59 +0000 (07:04 -0400)]
gtk-demo: Improve language handlng

In the font features demo, don't add a
item for the default language to the dropdown,
that does not make sense.

3 years agogtk-demo: Add a few mssing language names
Matthias Clasen [Tue, 1 Nov 2022 23:04:07 +0000 (19:04 -0400)]
gtk-demo: Add a few mssing language names

3 years agogtk4-demo: Tweak the pickers demo
Matthias Clasen [Sun, 6 Nov 2022 14:34:24 +0000 (15:34 +0100)]
gtk4-demo: Tweak the pickers demo

Redo the file picker a bit.

3 years agopo: Match make-pot
Matthias Clasen [Tue, 1 Nov 2022 11:14:45 +0000 (07:14 -0400)]
po: Match make-pot

We are not normally using the gtk40-pot target to
generate the gtk40.pot file. On the off chance that
somebody does, lets make sure we pass the same
arguments to xgettext here as in the make-pot script
that is used on damn lies.

3 years agoAdd a test for picker button constructors
Matthias Clasen [Mon, 7 Nov 2022 14:32:51 +0000 (15:32 +0100)]
Add a test for picker button constructors

This turns out to be hard enough that a test
is useful.

3 years agocolordialogbutton: Actually accept NULL
Matthias Clasen [Mon, 7 Nov 2022 14:24:13 +0000 (15:24 +0100)]
colordialogbutton: Actually accept NULL

As pointed out in #5321, my previous fix was not
good enough.

Fixes: #5321
3 years agowayland: calculate union of geometry of all monitors for toplevel bounds
Colin Kinloch [Mon, 7 Nov 2022 11:08:18 +0000 (11:08 +0000)]
wayland: calculate union of geometry of all monitors for toplevel bounds

Signed-off-by: Colin Kinloch <colin.kinloch@collabora.com>
3 years agodoc/comment fix: the ref to @self was misspelled as self@ for gtkaspectframe.h/gtk_as...
Cam Cook [Sun, 6 Nov 2022 22:59:23 +0000 (17:59 -0500)]
doc/comment fix: the ref to @self was misspelled as self@ for gtkaspectframe.h/gtk_aspect_frame_get_child

Noticed this while reviewing the gi-docgen docs for GtkAspectFrame while developing some java bindings.
It's my understanding that @self was intended; as it would cause gi-docgen to interpret it as a reference to
the the GtkAspectFrame pointer named 'self'.

3 years agoMerge branch 'fix-color-button-new' into 'main'
Matthias Clasen [Sun, 6 Nov 2022 13:36:49 +0000 (13:36 +0000)]
Merge branch 'fix-color-button-new' into 'main'

color/fontdialogbutton: Fix constructors

Closes #5321

See merge request GNOME/gtk!5199

3 years agocolor/fontdialogbutton: Fix constructors
Matthias Clasen [Sun, 6 Nov 2022 13:12:02 +0000 (14:12 +0100)]
color/fontdialogbutton: Fix constructors

The arguments were meant to be nullable.
Make it so!

Fixes: #5321
3 years agoLink the file mentioned as a reference for key values
Pedro Sader Azevedo [Sun, 6 Nov 2022 01:54:38 +0000 (01:54 +0000)]
Link the file mentioned as a reference for key values

3 years agoUpdate Hungarian translation
Balázs Úr [Sat, 5 Nov 2022 22:21:06 +0000 (22:21 +0000)]
Update Hungarian translation

3 years agoUpdate Croatian translation
Goran Vidović [Sat, 5 Nov 2022 18:55:57 +0000 (18:55 +0000)]
Update Croatian translation

3 years agoMerge branch 'make-pot-update' into 'main'
Matthias Clasen [Sat, 5 Nov 2022 10:50:51 +0000 (10:50 +0000)]
Merge branch 'make-pot-update' into 'main'

Add new printf patterns to make-pot

See merge request GNOME/gtk!5197

3 years agoAdd new printf patterns to make-pot
Matthias Clasen [Tue, 1 Nov 2022 11:07:51 +0000 (07:07 -0400)]
Add new printf patterns to make-pot

This script is used to extract our strings for translators
on damn lines, and passing these flags to xgettext makes
it put a hint into the pot file about strings that are
used as printf format strings.

3 years agoMerge branch 'gdk-win32-settings-rework' into 'main'
Luca Bacci [Fri, 4 Nov 2022 16:00:25 +0000 (16:00 +0000)]
Merge branch 'gdk-win32-settings-rework' into 'main'

GdkWin32 settings rework

See merge request GNOME/gtk!5193

3 years agoGdkWin32: Add more GDK_NOTE calls for settings
Luca Bacci [Fri, 4 Nov 2022 15:11:27 +0000 (16:11 +0100)]
GdkWin32: Add more GDK_NOTE calls for settings

3 years agoGdkWin32: Set the "gtk-hint-font-metrics" property
Luca Bacci [Fri, 4 Nov 2022 14:59:15 +0000 (15:59 +0100)]
GdkWin32: Set the "gtk-hint-font-metrics" property

Helps for https://gitlab.gnome.org/GNOME/gtk/-/issues/5257

3 years agoGdkWin32: Set the "gtk-cursor-blink" setting
Luca Bacci [Fri, 4 Nov 2022 14:57:25 +0000 (15:57 +0100)]
GdkWin32: Set the "gtk-cursor-blink" setting

3 years agoGdkWin32: Set the "gtk-cursor-theme-size" setting
Luca Bacci [Fri, 4 Nov 2022 14:56:20 +0000 (15:56 +0100)]
GdkWin32: Set the "gtk-cursor-theme-size" setting

Note that we have to set the logical value, that's why
we use GetSystemMetrics and not GetSystemMetricsForDpi.

3 years agoGdkWin32: Detect the high contrast setting
Luca Bacci [Fri, 4 Nov 2022 14:54:02 +0000 (15:54 +0100)]
GdkWin32: Detect the high contrast setting

And set the theme name accordingly ("Default-hc")

3 years agoGdkWin32: Fix leak of screen HDC
Luca Bacci [Fri, 4 Nov 2022 14:38:29 +0000 (15:38 +0100)]
GdkWin32: Fix leak of screen HDC

3 years agoGdkWin32: Remove special-casing for old Pango versions
Luca Bacci [Fri, 4 Nov 2022 14:35:04 +0000 (15:35 +0100)]
GdkWin32: Remove special-casing for old Pango versions

We require Pango 1.50 now

3 years agoGdkWin32: Remove old code
Luca Bacci [Fri, 4 Nov 2022 14:31:40 +0000 (15:31 +0100)]
GdkWin32: Remove old code

3 years agoGdkWin32: Sort settings alphabetically
Luca Bacci [Fri, 4 Nov 2022 14:30:12 +0000 (15:30 +0100)]
GdkWin32: Sort settings alphabetically

3 years agofocus: fall back to old behaviour if we didn't focus anything
Adam Williamson [Wed, 2 Nov 2022 00:26:29 +0000 (17:26 -0700)]
focus: fall back to old behaviour if we didn't focus anything

8455b9ac74 seems to have introduced a problem where we can wind
up focusing no widget at all if the `while (parent)` loop doesn't
find a widget it can successfully move the focus to. This 'fixes'
that by falling back to doing the previous thing if we make it
all the way through that loop without moving the focus. Thanks to
@coreyberla for a hint to improve the implementation.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
3 years agogdk/wayland: Fix button mask calculation on button events
Carlos Garnacho [Wed, 2 Nov 2022 16:11:10 +0000 (17:11 +0100)]
gdk/wayland: Fix button mask calculation on button events

There's 2 things broken here:
- The mask was calculated on top of the GDK button (i.e. skipping
  4-7 buttons), so GDK_BUTTON4_MASK and GDK_BUTTON5_MASK were not
  assigned. This is now calculated on the (continuous) BTN_ evcodes
  so it is guaranteed that the next 2 physical buttons (i.e.
  back/forward) get these two places in the mask assigned.
- Furthermore, these buttons would be pushed to places in the
  modifier mask that they didn't belong to. It is now checked hard
  that only the first 5 buttons enable a modifier flag.

Overall, this ensures that no event masks with bonkers values are
forwarded, and that no stale implicit grabs are left after additional
buttons are pressed.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5301
3 years agoUpdate Turkish translation
Sabri Ünal [Wed, 2 Nov 2022 06:06:38 +0000 (06:06 +0000)]
Update Turkish translation

3 years agoUpdate Dutch translation
Nathan Follens [Tue, 1 Nov 2022 23:10:49 +0000 (23:10 +0000)]
Update Dutch translation

(cherry picked from commit 381c05607060c584779f9e6fab6f662ddfada1fa)

3 years agoX11: Provide settings in logical pixels
Luca Bacci [Wed, 26 Oct 2022 12:10:48 +0000 (14:10 +0200)]
X11: Provide settings in logical pixels

This makes GtkSettings values on X11 match what we get on
other backends.

Reporting size settings in logical pixels (i.e for scale
== 1) is useful for properly supporting mixed-DPI setups.
As X11 doesn't support mixed-DPI setups anyway, XSettings
doesn't bother providing logical values. Thus we scale
from physical to logical values ourselves.

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

3 years agoPost-release version bump
Matthias Clasen [Tue, 1 Nov 2022 02:22:06 +0000 (22:22 -0400)]
Post-release version bump

3 years ago4.9.1
Matthias Clasen [Tue, 1 Nov 2022 02:07:15 +0000 (22:07 -0400)]
4.9.1

3 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Tue, 1 Nov 2022 01:09:51 +0000 (01:09 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Revert "modules: Fix build on Visual Studio"

See merge request GNOME/gtk!5187

3 years agogdk: Bump the jpeg malloc limit
Matthias Clasen [Tue, 1 Nov 2022 00:35:15 +0000 (20:35 -0400)]
gdk: Bump the jpeg malloc limit

Bump the limit for memory use during jpeg loading
to 1GB, matching what gdk-pixbuf has for this.

3 years agoRevert "modules: Fix build on Visual Studio"
Matthias Clasen [Tue, 1 Nov 2022 00:18:12 +0000 (20:18 -0400)]
Revert "modules: Fix build on Visual Studio"

This reverts commit acd9c12667a021936b30e0fa8f43d3a8c7133cf7.

This commit breaks the build with GLib main on all platforms,
and defining _GLIB_EXTERN arguably invades the GLib namespace.

A different fix for msvc will have to be found.

3 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Mon, 31 Oct 2022 21:15:10 +0000 (21:15 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Be consistent in preconditions for async API

See merge request GNOME/gtk!5186

3 years agoBe consistent in preconditions for async API
Matthias Clasen [Mon, 31 Oct 2022 19:33:48 +0000 (15:33 -0400)]
Be consistent in preconditions for async API

Do the same checks in all our finish functions.

3 years agoUpdate Russian translation
Aleksandr Melman [Mon, 31 Oct 2022 12:30:25 +0000 (12:30 +0000)]
Update Russian translation

3 years agoMerge branch 'ebassi/since-for-main' into 'main'
Matthias Clasen [Sun, 30 Oct 2022 23:22:19 +0000 (23:22 +0000)]
Merge branch 'ebassi/since-for-main' into 'main'

Ebassi/since for main

See merge request GNOME/gtk!5185

3 years agodocs: Add missing Deprecated annotations
Emmanuele Bassi [Sun, 30 Oct 2022 20:08:39 +0000 (20:08 +0000)]
docs: Add missing Deprecated annotations

3 years agodocs: Add missing Since annotations
Emmanuele Bassi [Sun, 30 Oct 2022 20:08:21 +0000 (20:08 +0000)]
docs: Add missing Since annotations

3 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sun, 30 Oct 2022 13:29:35 +0000 (13:29 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

alertdialog: Small refactoring

See merge request GNOME/gtk!5184