Commit Graph

74668 Commits

Author SHA1 Message Date
Marco Melorio
553fde9761 docs: Don't mention deprecated API in gtk_widget_set_visible
That statement is true, but since that API is deprecated, it doesn't
need to be there anymore to avoid confusing people.
2023-01-08 21:49:28 +01:00
Barnabás Pőcze
f2593dec4b a11y: Use fallback logic when GApplication has no DBus object path
Use the fallback logic to generate the base path for the GtkAtSpiRoot
if the GApplication has no DBus object path to guarantee that
the base path will not stay NULL.
2023-01-08 19:58:54 +01:00
Barnabás Pőcze
ab5a6ed0f1 a11y: Check if path is NULL when removing from cache
`gtk_at_spi_cache_add_context()` checks if the GtkAtSpiContext's path
is NULL before inserting the context object into the hash table.
Do the same in `gtk_at_spi_cache_remove_context()` to avoid a NULL
pointer dereference in `g_str_hash()` during the hash table lookup
if a context with NULL path is removed. That can happen when the
GtkAtSpiRoot::base_path is NULL, which, in turn, can happen if
`g_application_get_dbus_object_path()` returns NULL.

  ==394047==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fd1966f8b84 bp 0x7fff11e3ded0 sp 0x7fff11e3de58 T0)
  ==394047==The signal is caused by a READ memory access.
  ==394047==Hint: address points to the zero page.
      #0 0x7fd1966f8b84 in g_str_hash (/usr/lib/libglib-2.0.so.0+0x37b84)
      #1 0x7fd1966f9c09 in g_hash_table_contains (/usr/lib/libglib-2.0.so.0+0x38c09)
      #2 0x7fd196062c10 in gtk_at_spi_cache_remove_context ../gtk/a11y/gtkatspicache.c:447
      #3 0x7fd19606e0a9 in gtk_at_spi_root_unregister ../gtk/a11y/gtkatspiroot.c:653
      #4 0x7fd196067f58 in gtk_at_spi_context_unrealize ../gtk/a11y/gtkatspicontext.c:1559
      #5 0x7fd195ced97f in gtk_at_context_unrealize ../gtk/gtkatcontext.c:668
      #6 0x7fd195f5576e in gtk_widget_unroot_at_context ../gtk/gtkwidget.c:2399
      #7 0x7fd195f55bd2 in gtk_widget_unroot ../gtk/gtkwidget.c:2499
      ...
2023-01-08 19:56:49 +01:00
Matthias Clasen
dd3cdc52f5 Fix code style 2023-01-08 14:41:11 +00:00
Matthias Clasen
5a3156a8b7 gdk: Update docs
Update the docs for gdk_display_get_monitor_at_surface.
2023-01-07 21:35:29 -05:00
Matthias Clasen
a4c2f19155 Merge branch 'gdk-display-get-monitor-is-nullable' into 'main'
gdkdisplay: Document get_monitor_at_surface can return NULL

Closes #5075

See merge request GNOME/gtk!4917
2023-01-07 20:39:04 +00:00
Matthias Clasen
be8fb1e9b8 Merge branch 'more-filesystemmodel-cleanups' into 'main'
filesystemmodel: Crop tree model cruft

See merge request GNOME/gtk!5402
2023-01-07 18:42:14 +00:00
Matthias Clasen
52c97dbf67 Merge branch 'win-file-ext' into 'main'
filechoosernativewin32: Set default extension

See merge request GNOME/gtk!5266
2023-01-07 18:14:37 +00:00
robxnano
57ebf26f15 filechoosernativewin32: Set default extension 2023-01-07 18:14:36 +00:00
Matthias Clasen
32247bc50e filesystemmodel: Drop tree model cruft
We no longer need the placeholder item for the
editable, so drop it.
2023-01-07 12:22:25 -05:00
Matthias Clasen
ad940bc892 filesystemmodel: Rename private header 2023-01-07 12:01:15 -05:00
Matthias Clasen
7d34e7e0f7 Merge branch 'filesystemmodel-cleanups' into 'main'
filesystemmodel: Cleanup unused defines

See merge request GNOME/gtk!5401
2023-01-07 14:36:20 +00:00
Georges Basile Stavracas Neto
b2f43076bd gtkfilesystemmodel: Use g_clear_* helpers
Saves some code.
2023-01-07 09:17:37 -05:00
Georges Basile Stavracas Neto
202e889577 filesystemmodel: Use G_DECLARE_FINAL_TYPE()
Clean up boilerplate. It's a private object anyway.
2023-01-07 09:17:37 -05:00
Georges Basile Stavracas Neto
a8690c84ab filesystemmodel: Cosmetics
Adjust code style, and shuffle some functions around. Remove
unhelpful doc comments.
2023-01-07 09:17:15 -05:00
Matthias Clasen
35244f4b59 filesystemmodel: Use g_set_object 2023-01-07 09:12:44 -05:00
Georges Basile Stavracas Neto
503c3ec04d filesystemmodel: Make function private to gtkfilesystemmodel.c
The _gtk_file_system_model_update_file() function is not used outside
GtkFileSystemModel, so no need to expose it in the header.

Shuffle it around in code, and remove it from the header.
2023-01-07 08:44:40 -05:00
Georges Basile Stavracas Neto
4a5a466975 filesystemmodel: Cleanup unused defines
They were made unused with the removal of GtkTreeModel interface
implementation.
2023-01-07 08:44:34 -05:00
Matthias Clasen
e694511da3 Merge branch 'werror-fixes' into 'main'
gtk-launch: Remove compile-time warning

See merge request GNOME/gtk!5400
2023-01-07 13:22:20 +00:00
Matthias Clasen
0a94827b9c Merge branch 'wip/corey/calendar' into 'main'
calendar: Fix marked days

See merge request GNOME/gtk!5399
2023-01-07 13:11:01 +00:00
Corey Berla
735cf301a4 calendar: Set marked days immediately
The marked days are set only as part of gtk_calendar_select_day().
This is insufficient, especially because the day-selected signal
is emitted after the marked days are set in gtk_calendar_select_day().
2023-01-06 20:37:54 -08:00
Corey Berla
e8a29f90d1 calendar: Only apply the marked_day to the current month
The marked day gets applied to the current month, and either the previous
or subsequent month if they are visible within the current month.
This doesn't make any sense and likely was an accidental regression
in a6f9052cf1.  Clarify the docs.
2023-01-06 20:21:35 -08:00
Corey Berla
182cc74834 calendar: Add css style for marked days
As part of a6f9052cf1, marked days lost
their style, essentially making that function worthless.  Previously,
they were simply bolded, but that doesn't give them proper justice.
2023-01-06 20:21:35 -08:00
Matthias Clasen
7801dd8944 Merge branch 'wip/phako/fix-activate-action-annotation' into 'main'
widget: Mark format as nullable in activate_action

See merge request GNOME/gtk!4653
2023-01-07 01:06:00 +00:00
Matthias Clasen
38e090f5c1 Merge branch 'main' into 'main'
Fix a typo

See merge request GNOME/gtk!5170
2023-01-07 00:59:32 +00:00
Benjamin Otte
998c382037 build: Turn off tautological-constant-out-of-range-compare warning
This issues a warning when an enum value is compared to a value that is
out of range for the enum.

We do this a lot, either when using -1 for undefined values or when
comparing array sizes to enum values like so:

  enum {
    ONE,
    TWO,
    THREE
  } some_enum_value;
  const char *names= { "one", "two", "three" };

  g_assert (some_enum_value < G_N_ELEMENTS (names));
2023-01-06 19:46:58 -05:00
Benjamin Otte
ac81e71f78 gtk-launch: Fix unused variable warning on macOS 2023-01-06 19:46:58 -05:00
Benjamin Otte
de271c9a30 ci: Disable -Werror on all subprojects
Would be nice if meson had a nicer way of doing this, but...
2023-01-06 19:46:58 -05:00
Benjamin Otte
bf3cf8bb29 glcontext: Avoid gcc warning on non-egl build 2023-01-06 19:46:58 -05:00
Benjamin Otte
63fa5b7f52 gtk-launch: Remove compile-time warning
This warning causes a -Werror build to fail.
2023-01-06 19:46:58 -05:00
Matthias Clasen
96add330f5 Merge branch 'wayland-surface-split3' into 'main'
Split gdksurface-wayland.c

See merge request GNOME/gtk!5217
2023-01-06 22:35:34 +00:00
Matthias Clasen
44aa6a891a Drop gdkpopup-wayland-private.h
It is empty now.
2023-01-06 17:02:03 -05:00
Matthias Clasen
7a30a21405 waylandsurface: Introduce a few vfuncs 2023-01-06 17:00:45 -05:00
Matthias Clasen
2b3eadcfa4 waylandpopup: Drop unused exports 2023-01-06 16:50:20 -05:00
Matthias Clasen
352443d5a5 waylandtoplevel: Drop unused exports 2023-01-06 16:50:20 -05:00
Matthias Clasen
3574fde770 More cleanups 2023-01-06 16:50:20 -05:00
Matthias Clasen
793689789c Misc cleanups
Detangle compute_size, among other things.
2023-01-06 16:50:19 -05:00
Matthias Clasen
120396fa40 wip: Split off GdkWaylandPopup
Like the GdkWaylandToplevel split-off, this needs some
more cleanup.
2023-01-06 16:50:19 -05:00
Matthias Clasen
d61ec38974 wip: Split off GdkWaylandToplevel
This still needs some more cleanup.
2023-01-06 16:50:19 -05:00
Matthias Clasen
2a463baed0 wayland: Rearrange the surface code 2023-01-06 16:50:19 -05:00
Matthias Clasen
348acde6bd wayland: Split public headers
Split gdkwaylandsurface.h into itself,
gdkwaylandtoplevel.h and gdkwaylandpopup.h.
This is in preparation for splitting the
types for real.
2023-01-06 13:47:34 -05:00
Matthias Clasen
5ba793842b wayland: Split display_server sub-structs
Move these to GdkWaylandToplevel and GdkWaylandPopup
as appropriate.
2023-01-06 13:47:34 -05:00
Matthias Clasen
149b608bfc wayland: Move next_layout into popup and toplevel
This is where it belongs.
2023-01-06 13:47:34 -05:00
Matthias Clasen
3348ea81f2 wayland: Move pending toplevel state to GdkWaylandToplevel
Another toplevel-only thing.
2023-01-06 13:47:34 -05:00
Matthias Clasen
63e69131bd wayland: Move input_grab_seat to GdkWaylandPopup
This is popup-only functionality.
2023-01-06 13:47:34 -05:00
Matthias Clasen
d42a34b0b3 wayland: Move reposition_token to GdkWaylandPopup
This is only used for popups, so move it there.
2023-01-06 13:47:34 -05:00
Matthias Clasen
5ee10fc669 wayland: Move shortcuts_inhibitors to GdkWaylandToplevel
Another toplevel-only feature.
2023-01-06 13:47:22 -05:00
Matthias Clasen
b0a4917ce4 wayland: Move imported_transient_for to GdkWaylandToplevel
Another toplevel-only thing.
2023-01-06 13:47:22 -05:00
Matthias Clasen
47e22d6301 wayland: Move geometry hints to GdkWaylandToplevel
Another toplevel-only thing.
2023-01-06 13:47:12 -05:00
Matthias Clasen
b970b60503 wayland: Move title to GdkWaylandToplevel
This is a toplevel property.
2023-01-06 13:47:06 -05:00