Commit Graph

73675 Commits

Author SHA1 Message Date
Adam Williamson
824ff01eee 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>
2022-11-12 03:37:52 +02:00
Carlos Garnacho
9b74027dea 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
2022-11-12 03:37:34 +02:00
Luca Bacci
5b98e171b2 Merge branch 'do-not-block-input-wm-mouse-activate-gtk-4-8' into 'gtk-4-8'
GdkWin32: do not block input in advance from WM_MOUSEACTIVATE

See merge request GNOME/gtk!5207
2022-11-10 08:50:29 +00:00
Luca Bacci
f7d4a52ec3 GdkWin32: Do not use MA_NOACTIVATEANDEAT
GTK knows when a surface is modally blocked and automatically drops
button press and release events, so do not block input in advance
from WM_MOUSEACTIVATE.
2022-11-10 09:29:24 +01:00
Balázs Úr
1e5b47c7ef Update Hungarian translation 2022-11-05 22:22:32 +00:00
Daniel Mustieles
953c2ec3ae Updated Spanish translation 2022-11-02 09:45:53 +01:00
Sabri Ünal
ff8aadba7b Update Turkish translation 2022-11-02 06:04:08 +00:00
Nathan Follens
381c056070 Update Dutch translation 2022-11-01 23:10:49 +00:00
Zurab Kargareteli
f70c3548e1 Update Georgian translation 2022-11-01 19:57:41 +00:00
Nart Tlisha
5863ddbfdd Update Abkhazian translation 2022-10-31 09:51:47 +00:00
Matthias Clasen
c1c1daba40 Merge branch 'revert-9c919ffa462dd4511da0bfd19d36d2e15c51651b' into 'gtk-4-8'
[4.8] Revert "treepopover: Do not propagate natural width of content"

See merge request GNOME/gtk!5071
2022-10-26 22:08:53 +00:00
Mat
339b9eb1b9 Revert "treepopover: Do not propagate natural width of content"
This reverts commit 9c919ffa46.
2022-10-26 13:51:23 +03:00
Matthias Clasen
f569318d6f Merge branch 'cherry-pick-c00a23eb' into 'gtk-4-8'
wayland: Fix keycode->keyval mapping

See merge request GNOME/gtk!5167
2022-10-25 03:14:23 +00:00
Matthias Clasen
c5beeddff0 Post-release version bump 2022-10-24 14:04:36 -04:00
Matthias Clasen
81b8426360 4.8.2 2022-10-24 13:46:56 -04:00
Matthias Clasen
bb61b5fb5b Merge branch 'fix-wayland-keycode-mapping' into 'main'
wayland: Fix keycode->keyval mapping

Closes #5277

See merge request GNOME/gtk!5147

(cherry picked from commit c00a23ebbc)

1894a896 wayland: Fix keycode->keyval mapping
2022-10-24 17:05:06 +00:00
Мирослав Николић
b760f57ae1 Update Serbian translation 2022-10-23 09:21:30 +00:00
Matthias Clasen
070926a4cc Merge branch 'wip/antoniof/backport-list-focus' into 'gtk-4-8'
Backport MR !5023 to 4.8

See merge request GNOME/gtk!5157
2022-10-21 17:34:35 +00:00
Matthias Clasen
7a183681b1 Merge branch 'fix-focus-4-8' into 'gtk-4-8'
[4.8] window: Fix focus updates

See merge request GNOME/gtk!5133
2022-10-21 17:33:13 +00:00
Matthias Clasen
14c7a001a6 editablelabel: Defer changes on focus-out
We can get spurious focus-out/-in pairs when
the editable label is in a popover that gets
a Wayland keyboard enter event as a result of
clicking the editable label.

A timeout isn't a great solution, but nothing
better is available right now.

Fixes: #4864
2022-10-21 14:38:08 +03:00
Matthias Clasen
bcad03da6c window: Keep a reference to move_focus_widget
If we don't take a reference, it can happen that
the pointer is no longer valid by the time we
dereference it in after_paint.
2022-10-21 14:37:43 +03:00
António Fernandes
5d9576abb9 columnview: Forward all focus to child
For the same reasoning as the preceding commit.

Also don't make GtkColumnView focusable. Its internal list view
is already focusable, which is enough to take care of the empty
view case.


(cherry picked from commit 9cb8d21cb5)
2022-10-21 08:03:43 +00:00
António Fernandes
b86c91de1d listbase: Grab focus on items instead of container
The container view itself being focusable makes keyboard navigation
slower by adding a useless focus step.

It also means if an item gets removed, the focus jumps back to the view,
instead of jumping to the next item, as seen in nautilus bug report:
https://gitlab.gnome.org/GNOME/nautilus/-/issues/2489

Instead of making the GtkListBase container itself focusable, override
the .grab_focus() vfunc. This way, calling gtk_widget_grab_focus() on
the view container keeps working sucessfully, but focuses the focus
item directly instead.

This is particularly useful to have because applicaiton authors do
not have direct acess to this class's children, so they can't call
gtk_widget_grab_focus() on them directly.


(cherry picked from commit 4fc4298920)
2022-10-21 08:03:14 +00:00
Matthias Clasen
a0d85f36ab window: Don't focus invisible widgets
Only clear a queued move_focus if the widget
we are focusing is actually visible.

This was happening in some cases when popovers
are dismissed by clicking outside, and it was
causing us to miss proper focus updates that
were already queued.
2022-10-18 20:37:19 +03:00
Matthias Clasen
8455b9ac74 window: Fix focus updates
This partially undoes changes from 3dbf5038fa.

That commit did two things:
1) Move the focus update to after-paint time
2) Change from grabbing focus to the visible parent
   to  calling move_focus (TAB)

The second part did have the unintended consequence
of moving focus laterally.

Fixes: #4903
2022-10-18 20:37:05 +03:00
Kukuh Syafaat
e87801f7e6 Update Indonesian translation 2022-10-18 02:47:51 +00:00
Luca Bacci
a4df9f3d09 Merge branch 'backport-mr-4986-to-gtk-4-8' into 'gtk-4-8'
Use native Windows API for converting keystrokes to characters

See merge request GNOME/gtk!5130
2022-10-17 20:40:44 +00:00
Philip Zander
f2ccb4192e Use native Windows API for converting keystrokes to characters 2022-10-17 22:11:35 +02:00
Aleksandr Melman
b71b7ea47f Update Russian translation 2022-10-09 13:24:27 +00:00
Zurab Kargareteli
ec9f9d9e96 Update Georgian translation 2022-10-06 21:21:24 +00:00
Jürgen Benvenuti
52dd917c6a Update German translation 2022-10-06 20:48:31 +00:00
Matthias Clasen
8070cfd173 Merge branch 'wip/headless-infinite-bounds-4-8' into 'gtk-4-8'
[4.8] Fix shrinking windows on suspend/resume

See merge request GNOME/gtk!5090
2022-10-06 10:42:51 +00:00
Jonas Ådahl
47b7988ccb toplevel-size: Report zero bounds as infinite
Empty/zero bounds are sent by the Wayland compositor if there are no
valid bounds to report, e.g. if there are no connected monitors. Report
this to GTK, which uses this to clamp calculated sizes, as INT_MAX, so
that clamping isn't done until there are actual valid bounds to clamp
to.

This fixes clients sometimes shrinking to their minimum size during
hotplugs or after having suspended the session.

(cherry picked from commit b3a3a6ceb1)
2022-10-06 10:42:32 +02:00
Jonas Ådahl
79eab08797 surface/wayland: Handle no current monitor when calculating bounds
We shouldn't assume there is always a monitor to derive bounds from.
If there is no monitor, pass empty bounds, as this matches what
xdg_toplevel.configure_bounds do in this case.

(cherry picked from commit 148c133674)
2022-10-06 10:42:27 +02:00
Alexander Shopov
2ca2a15637 Update Bulgarian translation 2022-10-04 18:07:20 +00:00
Jordi Mas
82ca302ec4 Update Catalan translation 2022-10-03 20:07:15 +02:00
Fabio Tomat
6387863256 Update Friulian translation 2022-10-03 08:35:52 +00:00
Goran Vidović
8c24e1467d Update Croatian translation 2022-10-02 14:03:13 +00:00
Emin Tufan Çetin
e7984a84cb Update Turkish translation 2022-10-01 14:56:16 +00:00
Matthias Clasen
a66b3caa1a Post-release version bump
This is an experiment to see if I can keep up with
doing post-release version bumps, so git snapshots
will always have a different version from released
tarballs.
2022-09-28 13:17:46 -04:00
Matthias Clasen
39bc13c8a7 Merge branch 'matthiasc/for-main' into 'main'
Add more names to sources

See merge request GNOME/gtk!5064
2022-09-28 17:02:09 +00:00
Matthias Clasen
dd7cd6ffdd Add more names to sources
This helps with identifying things in sysprof logs,
and while debugging.
2022-09-28 12:37:21 -04:00
Matthias Clasen
349cda3d36 Merge branch 'post-install' into 'main'
meson: Remove post-install script

See merge request GNOME/gtk!5063
2022-09-28 16:21:49 +00:00
Xavier Claessens
48cc56081d meson: Remove post-install script
GTK depends on Meson >= 0.60 so it was never used.
2022-09-28 11:25:43 -04:00
Matthias Clasen
aa9a7a931d Merge branch 'wip/carlosg/shuffle-reset-take2' into 'main'
gtkimcontextwayland: Shuffle full resets after IM changes

Closes #5200

See merge request GNOME/gtk!5050
2022-09-28 01:39:49 +00:00
Matthias Clasen
3aee45de28 Merge branch 'wroy-main-patch-32519' into 'main'
Fix #5211: Preprocessor conformance with MSVC

Closes #5211

See merge request GNOME/gtk!5058
2022-09-28 01:39:15 +00:00
Matthias Clasen
5f469d8903 Merge branch 'broadway-device-query-state-fix' into 'main'
GTK4 gdk/broadway: correct gdk_broadway_device_query_state() to return pointer coordinates relative to the upper left corner of surface

See merge request GNOME/gtk!5053
2022-09-28 01:38:45 +00:00
Matthias Clasen
2ce2e90205 Merge branch 'fix-scale-crashes' into 'main'
scale: Fix a typo

See merge request GNOME/gtk!5061
2022-09-28 01:22:49 +00:00
Matthias Clasen
8b76cc841d scale: Fix a typo
We want to update the label size request when
the adjustment changes, not when anything else
changes.

This may be the reason for crash reports like
https://retrace.fedoraproject.org/faf/problems/bthash/?bth=1e5cc1318358d5db298e5d6c2ec47361922cce74
2022-09-27 21:03:56 -04:00
Aurimas Černius
75b1d75751 Updated Lithuanian translation 2022-09-27 22:40:49 +03:00