Commit Graph

28528 Commits

Author SHA1 Message Date
Matthias Clasen
1dc428dc3e Fix distcheck 2021-04-22 22:47:16 -04:00
Matthias Clasen
9b0eec55aa Merge branch 'listbox-extend' into 'gtk-3-24'
Allow GtkListBox multiple selection to be extended repeatedly

See merge request GNOME/gtk!3459
2021-04-23 02:47:05 +00:00
Matthias Clasen
d6c45d0e17 imcontext: Fix cursor positions
gtk_im_context_get_preedit_string is documented to
return the cursor position as a character offset,
not a byte count. So return that.

Fixed: #3885
2021-04-22 21:33:59 -04:00
John Renner
42d4e6de51 Fix extend selection behavior in ListBox 2021-04-22 16:30:12 -07:00
Ulli Kehrle
d3a564d4f9
imcontextsimple: Ignore more modifiers in compose
Previously it was impossible to compose characters on higher levels of
some keyboard layouts as pressing the level selection key would just
exit compose mode.

Examples for affected keyboard layouts include the Latvian
apostrophe-variant "lv(apostrophe)" (latched third level), the extended
German keyboard layout "de(e1)" (latched fifth level) as well as the
multilingual Canadian keyboard layout "ca(multix)" and the German
neo-layout "de(neo)" and its descendants (shifted fifth level).

To reproduce, set a compose key and select the Latvian apostrophe layout.
Notice that you now can input [ by pressing first the ' and then the 8-key.
Then pressing <compose>'8'8 should produce ⟦, but prior to this patch it
did not.
2021-04-22 03:53:49 +02:00
Ondrej Holy
4fe7b3ec25 placesview: Open location even if mount was not found
Some locations have to be mounted, but their mounts are not user-visible
(e.g. smb-browse). Though this is maybe a bit weird, it is how it works
for years. The problem is that the commit 267ea755, which tries to get the
default location for opening, caused regression as it doesn't expect such
possibility. Before this commit, such locations were opened without any
issue, but nothing happens currently after clicking to "Connect" except of
clearing the "Connect to Server" entry. Let's fallback to the original
location if the mount was not found to fix this regression.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1811
2021-04-21 15:33:34 +02:00
Timm Bäder
25879ea37e scrolledwindow: Always add other scrollbar size...
... if we're not using indicators and the policy may be visible. Not
doing this if the policy may be invisible is incorrect as we need to
reserve the space anyway in case the scrolledwindow is allocated at
minimum size and the child size increases to show the scrollbar.
2021-04-19 14:43:01 -04:00
John Ralls
242b76a771 Add a public header for Cocoa access functions.
Some applications need to access gdk_quartz_window_get_nsview,
gdk_quartz_window_get_nswindow, and gdk_quartz_event_get_nsevent
so move these from the private gdkquartz-gtk-only.h to a new
header gdkquartz-cocoa-access.h. Don't include this header in
gdkquartz.h so that user code that doesn't need to access these
functins isn't required to compile with Objective C/C++.

Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/1737
2021-04-16 16:56:55 -07:00
Matthias Clasen
3aa742d715 overlay: Clarify pass-through docs
Explain that widgets with their own windows need to
have gdk_window_set_pass_through called on them.

Fixes: #3861
2021-04-16 11:15:05 -04:00
Matthias Clasen
a1aa4a970d Merge branch 'latest.glib.msvc-3' into 'gtk-3-24'
GTK-3.x: Fix builds against latest stable GLib with Visual Studio

See merge request GNOME/gtk!3445
2021-04-16 12:37:52 +00:00
Chun-wei Fan
b69790a776 gtkimcontextsimple.c: Declare variables at top-of-block
This way, things will continue to build on older compilers
2021-04-16 15:38:17 +08:00
Chun-wei Fan
da651ca7fc update-icon-cache.c: Declare variables at top-of-block
This way, things will continue to build on older compilers
2021-04-16 15:36:58 +08:00
Chun-wei Fan
35fee660ff gtkcsscustomgadget.c: Fix build with latest stable GLib with MSVC
This eliminates the C4098 warnings ('void' function returning a value),
which is considered by GLib-2.68.x or later to be an error.
2021-04-16 15:28:28 +08:00
Matthias Clasen
a926f217d7 imcontext: Eat key events during preedit
Avoid passing through random key press or release
events while we are showing preedit. That prevents
'accidents' like typing Ctrl-. bringing up the
Emoji chooser during preedit, or hitting Ctrl-a
after the Compose key moving the 'dot' around in
vim in terminals.
2021-04-15 17:46:19 -04:00
Matthias Clasen
3fb5890e69 fontchooser: Fix some since annotations
The "level", "font-features" and "language" were annotated
with the wrong version.

Fixes: #1830
2021-04-11 23:22:46 -04:00
Matthias Clasen
5b13ae1b2e Merge branch 'ebassi/hvbox-docs' into 'gtk-3-24'
docs: Remove any reference to GtkGrid in Gtk[HV]Box

See merge request GNOME/gtk!3422
2021-04-11 13:14:33 +00:00
Emmanuele Bassi
3377dc7d40 docs: Remove any reference to GtkGrid in Gtk[HV]Box
GtkBox is not going away, so there's not point in making things more
confusing for those who are still porting their code from GTK2 to GTK3
10 years after GTK 3.0 was released.

Fixes: #3854
2021-04-10 23:57:03 +01:00
Matthias Clasen
eaabc3722e scale: Fix sporadic criticals
gtk_css_node_update_layout_attributes can cause us to
free priv->layout, and then bad things happen. Therefore,
we must call that function on a new layout *before* setting
priv->layout.
2021-04-10 10:07:55 -04:00
CEO of Programming
475a4c8262 Update gtklistbox.c 2021-04-10 01:04:05 +00:00
Matthias Clasen
ed9b3f5057 Revert Compose sequence changes
This was breaking muscle memory of people with
the us intl keyboard layout, for important keys
such as '. The unfortunate side-effect is that
our handling of <dead_acute> is a bit hampered
by sequences that don't fit the pattern. But
such is life.

Fixes: #3807
2021-04-01 15:52:12 -04:00
Carlos Garnacho
0ec077bcdc Merge branch 'wip/exalm/overshoot-changes-gtk3' into 'gtk-3-24'
scrolledwindow: Cancel overshoot on dimension changes

See merge request GNOME/gtk!3333
2021-04-01 12:14:10 +00:00
Alexander Mikhaylenko
27d38eca9a scrolledwindow: Cancel overshoot on dimension changes
If we scroll down in a list that's still being filled, we hit the edge and
initiate overshoot, and then the adjustment's upper value increases. This
leads to an unwanted bounce back.

Additionally, if in a similar situation the upper value decreases, the
overscroll glow gets stuck.

Update kinetic scrolling upper and lower value on changes, and immediately
cancel it if dimensions on that side change.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3752
2021-04-01 16:37:03 +05:00
Matthias Clasen
9a2382bebc Merge branch 'spinbutton-localized-digits-3' into 'gtk-3-24'
spinbutton: Interpret localized digits

See merge request GNOME/gtk!3369
2021-03-30 02:37:41 +00:00
Matthias Clasen
fa69e5f42d spinbutton: Interpret localized digits
Interpret input where the characters have numeric values.

See #3387
2021-03-29 22:10:06 -04:00
Matthias Clasen
316aa85b8d label: Fix reacting to screen resolution changes
Labels were not reacting when the screen resolution
changes, as e.g. when turning "Large Text" on of off.
2021-03-29 20:48:15 -04:00
Matthias Clasen
ba8c18019d imcontext: Look for Compose file in the right place
The documentation states that GTK will load a Compose
file from ~/.config/gtk-3.0/Compose. Unfortunately,
backports changed this unintentionally to look in
the gtk-4.0 directory. Change it back.
2021-03-29 18:31:23 -04:00
Matthias Clasen
3c6d96980f Fix make dist 2021-03-26 21:54:29 -04:00
Matthias Clasen
4c7944175f Merge branch 'double-dead-keys-3' into 'gtk-3-24'
Double dead keys 3

See merge request GNOME/gtk!3354
2021-03-27 01:11:20 +00:00
Matthias Clasen
8c7846733a imcontext: Tweak dead key handling
Reshuffle things to allow for a limited amount of
dead key 'chaining'. We keep up to 2 dead keys in
the preedit, so you can type
<dead_acute> <dead_cedilla> <c>
to produce ḉ, while still getting ```c with
<dead_grave> <dead_grave> <dead_grave> <c>.
2021-03-26 20:42:24 -04:00
Matthias Clasen
58b3145c90 composetable: Limit algorithmic checking
Only check for combinations of up to 2 dead keys with
a base character. We don't want to spend ages generating
all permutations of long sequences.
2021-03-26 20:28:14 -04:00
Daniel van Vugt
86da4e0c97 cssshadowvalue: Apply device scale to the offset when blurring text
Although the surface already has the device scale set, that doesn't
apply to the offset which is in raw device units. So we need to scale
the device offset explicitly.

Fixes: https://gitlab.com/rastersoft/desktop-icons-ng/-/issues/119
2021-03-24 18:37:12 +08:00
Matthias Clasen
59397005fa Regenerate compose sequence file
Update our compose sequences based on the current
update xorg Compose.pre file. Beyond that, remove
some deadkey sequences that we are now handling
(better) in code.
2021-03-21 22:11:37 -04:00
Matthias Clasen
41c3e9873c Move compose related tooling to a subdir
This reduces the clutter in gtk/.
2021-03-21 22:11:27 -04:00
Matthias Clasen
7b3c387af9 compose-parse: Add a negative lookaside
Make this script parse gtk-compose-remove.txt for
sequences to remove from the xorg Compose file.
This will be used for removing some deadkey combinations
that we can handle better in code.

Also, make this script explicitly python2. I tried
porting it to python3, but gave up in the end.
2021-03-21 22:11:16 -04:00
Matthias Clasen
a0cdd25bd4 imcontext: Improve dead key handling more
For sequences like ``, we want to commit the first
deadkey and then continue preedit with the second.

The alternative is to do chained deadkeys, where
entering ~~a yields ̃̀̃̃a. But we don't do that, and
I think that would be more controversial.
2021-03-21 22:09:56 -04:00
Matthias Clasen
c26525f87c imcontext: Improve dead key handling
For sequences like `x, where we don't have a compose
sequence, we still want to commit "`x", and not silently
eat the keys.
2021-03-21 22:09:41 -04:00
Bernhard M. Wiedemann
850768270f updateiconcache: Sort list of entries
because filesystem readdir order is indeterministic.

Without this patch, building openSUSE's balsa package
had variations between builds in /usr/share/balsa/icon-theme.cache

(cherry picked from commit b364827a5b)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2021-03-13 15:12:18 +00:00
Timm Bäder
bfe0f7dd4d label: Skip updating link state if we have no layout
This can happen whenever the ::activate-link handler sets different
markup on the label, causing all links to be recreated. In this case,
the GtkLabelLink* passed to emit_activate_link is garbage after the
g_signal_emit call and we shouldn't try to do anything with it.

Fixes #1498
2021-03-05 14:56:20 -05:00
Alexander Mikhaylenko
d70fa89bdf Adwaita: Use transparent black for window border in dark too
Avoid smear when the background behind the window is dark. Adjust opacity
to make it appear roughly the same as before on white background.
2021-03-05 22:43:49 +05:00
Sebastian Keller
392e52187d Adwaita: Ensure SSD decorations do not change size when losing focus
56f6ac5f introduced a 20px shadow for the '.tiled decoration:backdrop'
selector. This selector is more specific than the '.ssd decoration'
selector and caused unfocused tiled SSD windows to have a shadow that
focused ones did not have. The mutter code however assumes that the size
of the decoration does not change between the states and this was
causing a crash when clicking below the titlebar in unfocused tiled SSD
windows.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3716
2021-03-05 00:36:15 +01:00
Alexander Mikhaylenko
d0cf3007c6 Revert "Add scaling adjustment for touch dragging a scrolled window"
This reverts commit d4943ef2fb.

This commit has broken scrolling in GtkTreeView. VTE has
`scroll-unit-pixels` property now, so the original issue is fixed
separately.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3707
2021-03-03 15:04:41 +05:00
Matthias Clasen
7b6f627666 imcontext: Fixes to the state machine
It turns out that we we were sometimes emitting
preedit-end multiple times, and sometimes not at
all. Same for preedit-start. To fix this up, introduce
a in_compose_sequence flag, maintain it, and use it
in the right places.

After these changes, both

C-S-u 1 2 3 Enter
Compose a e

generate the right signals:

preedit-start, preedit-changed,..., preedit-end, commit
2021-02-24 14:15:33 -05:00
Matthias Clasen
db1cb04896 imcontext: Take out the warnings
Don't warn about Compose file constructs we don't
support. We haven't supported these for a long time,
and nobody has every complained. No need to wake
up sleeping dogs.
2021-02-22 15:18:25 -05:00
Matthias Clasen
523d5121d3 imcontext: Make Compose preedit less intrusive
Tweak the preedit display for Compose sequences to
be not so distracting. We only show the Compose key
when it occurs in the middle of the sequence or is
the only key so far, and use · instead of ⎄ for it.

Also, make sure to display dead keys more adequately.
2021-02-18 12:38:22 -05:00
Matthias Clasen
f56a5ee260 Merge branch 'wip/jimmac/tiled-resize-area-gtk3' into 'gtk-3-24'
Adwaita: control surface for resize tiled windows

See merge request GNOME/gtk!3212
2021-02-17 03:53:55 +00:00
Matthias Clasen
8780cde919 imcontextsimple: Bring back modifier intent
This was lost by accident in 85d34932f3.
2021-02-16 19:31:17 -05:00
Jakub Steiner
56f6ac5fcc Adwaita: control surface for resize tiled windows
- window resizing control area is implemented as where the shadows are drawn
    - create a 'fake' shadow for the tiled case to allow easier resizing of
      the tiled window ratio even if it's offset to the side of the border

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3670
2021-02-16 14:23:12 +01:00
Jakub Steiner
3d30790280 Adwaita: Avoid fine-tune scrollbars jumping
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3672
2021-02-16 11:41:57 +01:00
Matthias Clasen
b201438b39 Merge branch 'wip/jimmac/larger-smaller-scrollbar-gtk3' into 'gtk-3-24'
Adwaita: Scrollbar transitions and size

See merge request GNOME/gtk!3205
2021-02-15 18:08:20 +00:00
Carlos Garnacho
dca64da1fe Merge branch 'touch-scroll-scale' into 'gtk-3-24'
Add scaling adjustment for touch dragging a scrolled window

See merge request GNOME/gtk!2615
2021-02-15 17:27:26 +00:00