Christian Hergert
a080f1197a
macos: ignore mouse events outside tracking area
...
We also need to ignore events outside the tracking areas when we are
translating them from NSevent into GdkEvent.
2022-02-16 03:06:51 -08:00
Christian Hergert
8f0b9bf5ae
macos: fix incorrect signal disconnect
2022-02-16 01:46:25 -08:00
Christian Hergert
d58c038fe8
macos: remove assertion from external API
...
We only should be asserting in static functions. Furthermore, this function
did not need to have GDK_BEGIN_MACOS_ALLOC_POOL as nothing is being
allocated there which would cause pooling to get used.
2022-02-15 12:38:07 -08:00
Christian Hergert
056e9012d2
macos: improve monitor detection at display coordinates
...
This needs to handle the boundary case where the value is exactly equal
to the edge of a rectangle (which gdk_rectangle_contains_point() does not
consider to be containing). However, if there is a monitor in the list
that is a better match, we still want to prefer it.
2022-02-15 12:38:07 -08:00
Christian Hergert
3e913ff16e
Merge branch 'mac-scrolling-fix' into 'main'
...
gdk: fix reversed and sluggish scrolling on MacOS
See merge request GNOME/gtk!4479
2022-02-14 23:00:27 +00:00
Andy Russell
37702af22b
gdk: fix reversed and sluggish scrolling on MacOS
...
When using an external mouse on MacOS, the scrolling behavior is
reversed from the user's scrolling preference. Additionally, it is
noticeably sluggish.
This commit fixes both issues by negating the deltas and multiplying
them by 32 before constructing a new scroll event. 32 seems to be the
"traditional" scaling factor according to [Druid], but I'm not sure
where that value actually comes from. Regardless, scaling the deltas by
this amount makes scrolling feel a lot more responsive in the GTK demos.
Scrolling with a trackpad is not affected by either issue because it
triggers a different code path that uses more precise deltas, and
already negates them.
[Druid]: https://linebender.gitbook.io/linebender-graphics-wiki/mouse-wheel#external-mouse-wheel-vs-trackpad
2022-02-14 14:05:39 -05:00
Matej Urbančič
4cb599f378
Update Slovenian translation
2022-02-13 18:58:22 +00:00
Matej Urbančič
fe210fb0dd
Update Slovenian translation
2022-02-13 18:56:28 +00:00
Asier Sarasua Garmendia
1fee30af36
Update Basque translation
2022-02-13 09:22:58 +00:00
Marek Černocký
1fd03acf9d
Updated Czech translation
2022-02-12 19:48:40 +01:00
Jordi Mas i Hernandez
c400dce0b1
Update Catalan translation
2022-02-12 14:41:46 +00:00
Matthias Clasen
5912b2d64a
Merge branch 'wip/chergert/fix-text-overdraw' into 'main'
...
css: reduce overdraws from "textview > text"
See merge request GNOME/gtk!4472
2022-02-12 08:34:18 +00:00
Christian Hergert
e38e8ed73e
css: reduce overdraws from "textview > text"
...
This was causing us to draw the same background content twice which is a
significant amount of bits to flip in the GPU for maximized windows,
especially twice.
2022-02-11 23:06:16 -08:00
Matthias Clasen
5088103d31
4.6.1
2022-02-11 20:09:15 -05:00
Matthias Clasen
76b185e6f6
Merge branch 'wip/chergert/popover-opaque-region' into 'main'
...
add opaque regions to popovers
Closes #4689
See merge request GNOME/gtk!4468
2022-02-11 23:16:43 +00:00
Christian Hergert
f3999f7ebf
popover: use GtkNative opaque region API
...
This updates GtkPopover to use the new GtkNative abstraction for
reporting opaque regions of the window, in hopes that it can speed
up compositors for things like animated lists, menu transitions,
and more.
Fixes #4689
2022-02-11 14:37:46 -08:00
Christian Hergert
f8e7ecfde1
window: use GtkNative API to update opaque region
...
This switches to using the new GtkNative machinery for updating the
opaque region. Some amount of local calculation is still required for
determining when we should apply shadows, and this inherits what was
done previous for that.
Related #4689
2022-02-11 14:37:46 -08:00
Christian Hergert
cc49e044a5
native: add API to update opaque region
...
This abstracts the machinery to update the opaque region for a GtkWindow
into GtkNative so it may be used from other native impelementations such
as GtkPopover.
Related #4689
2022-02-11 14:37:43 -08:00
Matthias Clasen
9205193147
Merge branch 'bilelmoussaoui/entry-completion' into 'main'
...
entry completion: add checks that entry is set already
See merge request GNOME/gtk!4450
2022-02-11 17:49:26 +00:00
Matthias Clasen
124d689f45
Merge branch 'enum-docs' into 'main'
...
docs: Use links in enums
See merge request GNOME/gtk!4452
2022-02-11 17:35:42 +00:00
Matthias Clasen
d2a2591d28
Merge branch 'bilelmoussaoui/g-i' into 'main'
...
g-i: add a couple of missing nullable annotations
See merge request GNOME/gtk!4470
2022-02-11 17:33:05 +00:00
Carlos Garnacho
64a1a1dd6b
Merge branch 'primary' into 'main'
...
gdk: don't leak wayland primary selection offers
See merge request GNOME/gtk!4458
2022-02-11 14:29:19 +00:00
Bilal Elmoussaoui
3b383569a4
g-i: Add nullable annotations to EventControllerKey::im-context
...
Fixes https://github.com/gtk-rs/gtk4-rs/issues/874
2022-02-11 12:59:55 +01:00
Bilal Elmoussaoui
c2fe438676
g-i: Add nullable annotations to CellArea getters
...
Fixes https://github.com/gtk-rs/gtk4-rs/issues/891
2022-02-11 12:55:28 +01:00
Emmanuele Bassi
0ade146e26
Merge branch 'bilelmoussaoui/layout-manager' into 'main'
...
layout manager: add a check if the widget exists
See merge request GNOME/gtk!4469
2022-02-11 11:51:44 +00:00
Bilal Elmoussaoui
ba266325d0
g-i: Mark FileChooser [s|g]et_current_[folder|name] as nullable
...
The code seems to already check if folder/name is NULL
Fixes https://github.com/gtk-rs/gtk4-rs/issues/896
2022-02-11 12:21:58 +01:00
Bilal Elmoussaoui
e6322e177e
g-i: Mark get_print_settings as nullable
...
Fixes https://github.com/gtk-rs/gtk4-rs/issues/880
2022-02-11 12:07:54 +01:00
Maximiliano Sandoval R
080a4cda49
docs: Use links in enums
...
Properties already refer to their object, so
[property@Widget:sensitive] property on [class@Widget]
is redundant.
2022-02-11 12:07:09 +01:00
Bilal Elmoussaoui
6b63868641
g-i: mark get_selected_printer as nullable
...
There is no selected printer if the user closes the dialog
Fixes https://github.com/gtk-rs/gtk4-rs/issues/882
2022-02-11 12:05:42 +01:00
Bilal Elmoussaoui
cb710f1999
g-i: mark EventController::name as nullable
...
Fixes https://github.com/gtk-rs/gtk4-rs/issues/893
2022-02-11 12:02:07 +01:00
Bilal Elmoussaoui
85bb9aaefc
g-i: add nullable annotation to gtk_single_selection_get_model
2022-02-11 11:56:40 +01:00
Bilal Elmoussaoui
6c02017212
layout manager: add a check if the widget exists
...
Avoid a crash when calling _gtk_widget_get_first_child
Fixes https://github.com/gtk-rs/gtk4-rs/issues/889
2022-02-11 11:44:16 +01:00
Matthias Clasen
90bccf4e82
Merge branch 'fix-wayland-subproject-build' into 'main'
...
NEWS: Updates
See merge request GNOME/gtk!4466
2022-02-10 21:57:27 +00:00
Matthias Clasen
18db7ad470
NEWS: Updates
2022-02-10 15:06:37 -05:00
Julian Orth
468ddd4d49
gdk: don't leak wayland primary selection offers
...
Signed-off-by: Julian Orth <ju.orth@gmail.com>
2022-02-10 20:44:32 +01:00
Matthias Clasen
ff4b5c8996
Merge branch 'fix-wayland-subproject-build' into 'main'
...
Fix build with wayland-protocols subproject
Closes #4530
See merge request GNOME/gtk!4465
2022-02-10 19:13:33 +00:00
Matthias Clasen
06aa640664
Fix build with wayland-protocols subproject
...
The missing files() was pointed out in #4530 .
Fixes : #4530
2022-02-10 13:21:28 -05:00
Matthias Clasen
9f24229f82
Merge branch 'column-view-column-new-nullable-factory' into 'main'
...
Allow passing a `NULL` factory to `gtk_column_view_column_new()`
See merge request GNOME/gtk!4454
2022-02-10 11:42:38 +00:00
Matthias Clasen
214370ee23
Merge branch 'icon-view-drag-dest-item-nullable' into 'main'
...
Mark `path` out parameter of `gtk_icon_view_get_drag_dest_item()` as `(nullable)`
See merge request GNOME/gtk!4451
2022-02-10 11:24:04 +00:00
Matthias Clasen
217d817408
Merge branch 'gwagner/gtkbuilder-rng' into 'main'
...
tools: updated gtk4builder.rng to current state
See merge request GNOME/gtk!4457
2022-02-09 19:25:32 +00:00
Matthias Clasen
6dfaafc9f2
Merge branch 'update-keysyms' into 'main'
...
gdk: Update keyboard symbols from libxkbcommon
See merge request GNOME/gtk!4422
2022-02-09 19:23:59 +00:00
Matthias Clasen
287de3844d
Merge branch 'gtk_assisten_set_current_page-no-pages-guard' into 'main'
...
Don't dereference a `NULL` page in `gtk_assistant_set_current_page()` if there are no pages at all
See merge request GNOME/gtk!4464
2022-02-09 19:19:24 +00:00
Sebastian Dröge
878e4a34d3
Don't dereference a NULL
page in gtk_assistant_set_current_page()
if there are no pages at all
2022-02-09 17:50:55 +02:00
Matthias Clasen
b893dc9552
Merge branch 'bilelmoussaoui/g-i' into 'main'
...
gdk: mark gdk_device_get_device_tool as nullable
See merge request GNOME/gtk!4463
2022-02-09 13:43:50 +00:00
Matthias Clasen
687b80a037
Merge branch 'revert-misdeprecation' into 'main'
...
Revert "Deprecate GdkDevice:source"
See merge request GNOME/gtk!4462
2022-02-09 13:13:35 +00:00
Bilal Elmoussaoui
a8a98523db
gdk: mark gdk_device_get_device_tool as nullable
2022-02-09 13:09:47 +00:00
Matthias Clasen
0a224964a6
Revert "Deprecate GdkDevice:source"
...
This reverts commit fd9e0dd13a
.
2022-02-09 07:55:28 -05:00
Luca Bacci
0457c37847
Merge branch 'win32-fix-ctrl-shift-gtk4' into 'main'
...
gdkkeys-win32: Also ignore Ctrl + Shift (etc.)
See merge request GNOME/gtk!4460
2022-02-09 10:08:52 +00:00
Philip Zander
037c0e4005
gdkkeys-win32: Also ignore Ctrl + Shift (etc.)
...
Some Windows keymaps have bogus mappings for the Ctrl modifier. !4423 attempted
to fix this by ignoring the Ctrl layer, but that was not enough. We also need to
ignore combinations of Ctrl with other modifiers, i.e. Ctrl + Shift. For example,
Ctrl + Shift + 6 is mapped to the character 0x1E on a US keyboard (but it should
be treated as Ctrl + ^). Basically, always ignore Ctrl unless it is used in
conjunction with Alt, i.e. as part of AltGr.
Related issue: #4667
2022-02-09 10:43:07 +01:00
Christian Hergert
b9389d3784
Merge branch 'bilelmoussaoui/macos-gdk-display' into 'main'
...
macos: Don't set NULL as a display name
See merge request GNOME/gtk!4453
2022-02-09 00:30:04 +00:00