Commit Graph

65975 Commits

Author SHA1 Message Date
Matej Urbančič
80e53e704c Update Slovenian translation 2020-09-10 20:09:27 +00:00
Matthias Clasen
24bf01dd42 Merge branch 'fix-vulkan-context-creation' into 'master'
Fix vulkan context creation

Closes #3147

See merge request GNOME/gtk!2555
2020-09-10 18:18:55 +00:00
Matthias Clasen
2113f98c5c gdk: Don't create surfaces of size 0x0
Don't pass 0x0 as size when calling gdk_surface_new().
The Wayland backend takes us literally, and we end
up with a surface that (temporarily) has these
dimensions, confusing other APIs that we pass the
size to, such as Vulkan.
2020-09-10 13:56:44 -04:00
Matthias Clasen
b9d4654fca vulkan: Fix swapchain creation
We end up with a surface that has size 0x0 at the
time we create the Vulkan context, and that is a
size that Vulkan doesn't like, so ensure we request
at least 1x1.

Fixes: #3147
2020-09-10 13:55:16 -04:00
Matthias Clasen
7151b1fc31 Merge branch 'ebassi/for-master' into 'master'
docs: Add note on command line arguments

See merge request GNOME/gtk!2554
2020-09-10 17:39:25 +00:00
Emmanuele Bassi
790733673f docs: Add note on command line arguments
We don't parse them any more, and developers should stop using them when
migrating from GTK3 to GTK4.
2020-09-10 17:53:50 +01:00
Milo Casagrande
aff788e583 Update Italian translation 2020-09-10 08:03:38 +00:00
Matthias Clasen
9b0b19d335 NEWS: Updates 2020-09-09 23:49:58 -04:00
Matthias Clasen
d47d036663 search entry: Don't propagate handled events
When the text says it has handled the event,
trust it. We don't want to emit ::search-started
if the content hasn't changed, but we still
should not propagate e.g. an Insert key press
if it has already toggled overwrite mode in
the text.

Fixes: #2874
2020-09-09 22:26:27 -04:00
Matthias Clasen
5c67fe0bc2 Merge branch 'fix-gl-texture-cache' into 'master'
gsk: Fix the gl texture cache

See merge request GNOME/gtk!2552
2020-09-09 19:27:24 +00:00
Matthias Clasen
1057588a8f gsk: Fix the gl texture cache
We need to include both the scale and the filtering
in the key for the texture cache, since those affect
the texture.

This fixes misrendering in the recorder in the inspector
whenever transforms are involved. An example where this
was showing up is testrevealer's swing transition.
2020-09-09 13:55:09 -04:00
Tim Sabsch
75f0b7acaa Update German translation 2020-09-09 17:23:14 +00:00
Benjamin Otte
9a927176df Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master

Closes #3137

See merge request GNOME/gtk!2550
2020-09-09 16:44:29 +00:00
Benjamin Otte
cb5b375f43 revealer: Remove arbitrary 100x scale limit
This is no longer necessary because the bug it was rying to solve is now
solved via the preference for min and nat size.
2020-09-09 17:38:37 +02:00
Benjamin Otte
dfccaa8831 revealer: Prefer min and nat size
Assume that the fully expanded revealer will likely get an allocation
that matches the child's minimum or natural allocation, so we
special-case these two values.

So when - due to the precision loss - multiple sizes would match the
current allocation, we don't pick one at random, we prefer the min and
nat size.

The preference of nat size over min sie was decided after an IRC vote,
we don't actually have an idea what's more likely to happen in the real
world.
Should we ever get better data, we might want to switch.
2020-09-09 17:38:37 +02:00
Benjamin Otte
cc58956dbb revealer: Use floor(), not ceil()
We use ceil() in measure(), so using it again will increase the
child's size whenever there is even a tiny rounding error.

This should also not make the size too small, because:
min = ceil(child_min * scale)
min / scale >= child_min
floor (min / scale) >= floor (child_min) = child_min
The last equality is because child_min is an integer.

Fixes #3137
2020-09-09 17:38:37 +02:00
Benjamin Otte
0ad10ccf39 revealer: Refactor code
Assign the values in the same place.
2020-09-09 17:38:37 +02:00
Benjamin Otte
8cb03a8cc0 widget: Add a critical when allocation is too small. 2020-09-09 17:38:37 +02:00
Emmanuele Bassi
df7cbdfff4 Merge branch 'issue-3140' into 'master'
Make sure we don't call back into GtkEntryBuffer

Closes #3140

See merge request GNOME/gtk!2549
2020-09-09 10:54:07 +00:00
Emmanuele Bassi
f4b410daa7 Make sure we don't call back into GtkEntryBuffer
After commit 7e77afe94c moved the deletion
of text into the signal handler, in order to make undo work, we need to
override the GtkEntryBuffer::deleted-text class closure when subclassing
GtkEntryBuffer, as well as overriding GtkEntryBufferClass.delete_text,
otherwise the default class closure will be invoked, and will try to
delete an empty buffer.

Fixes: #3140
2020-09-09 11:29:16 +01:00
Emmanuele Bassi
b3d3d81c82 Merge branch 'gtksecurememory-win32' into 'master'
Port gtksecurememory.c to Windows

See merge request GNOME/gtk!2548
2020-09-09 10:12:44 +00:00
Chun-wei Fan
3095bccd2e gtksecurememory.c: Port secure memory allocation to Windows
Use the Windows API CryptProtectMemory() to encrypt the data that we want to
secure, and use CryptUnprotectMemory() to de-crypt the secured data that we
want to access, since mmap() and mlock() are not available on Windows.
2020-09-09 13:50:15 +08:00
Chun-wei Fan
c72b2f6167 gtksecurememory.c: Don't include unistd.h unconditionally
It is not universally available on non-POSIX systems.
2020-09-09 13:48:33 +08:00
Matthias Clasen
3d10b28df4 Merge branch 'matthiasc/for-master' into 'master'
shadertoy demo: Cosmetic fixes

See merge request GNOME/gtk!2547
2020-09-09 00:40:54 +00:00
Matthias Clasen
d6807b966c shadertoy demo: Cosmetic fixes 2020-09-08 20:08:23 -04:00
Matthias Clasen
887d0b7411 Merge branch 'ebassi/secure-buffer' into 'master'
Add secure entry buffer

Closes #3119 and #2403

See merge request GNOME/gtk!2545
2020-09-08 23:48:25 +00:00
Matthias Clasen
3921476504 Merge branch 'shadertoy-demo' into 'master'
gtk-demo: Add shadertoy demo

See merge request GNOME/gtk!2540
2020-09-08 23:47:54 +00:00
Emmanuele Bassi
ae97284409 docs: Add a note on GtkPasswordEntry's secure storage 2020-09-08 23:50:12 +01:00
Emmanuele Bassi
7cda32d49e Use GtkPasswordEntryBuffer in GtkPasswordEntry
Now that we have a secure buffer, we should start using it.

Fixed: #3119
2020-09-08 23:50:12 +01:00
Emmanuele Bassi
fb99bde840 Add a secure GtkEntryBuffer
We have a widget for password and passphrase entries, but we have no way
to handle the data securely. This is usually performed by a separate
GtkEntryBuffer—for instance, the one in GCR. While we have API for
setting a new entry buffer on GtkText, we don't have API for
GtkPasswordEntry, though, so the options are:

 - expose additional API for GtkPasswordEntry to allow setting a secure
   text buffer on the internal GtkText widget
 - provide a secure text buffer out of the box

Given that an insecure-by-default GtkPasswordEntry is basically
pointless, might as well have a secure buffer built in.

We don't really need to make the password entry buffer public out of the
box, but we can re-evaluate at a later date.

Fixes: #2403
2020-09-08 23:50:12 +01:00
Emmanuele Bassi
9dc5c6a0f3 Move g_autoptr macro for GtkEntryBuffer
We need it into its own header, so we can derive from GtkEntryBuffer
with G_DECLARE_* macros without including gtk.h.
2020-09-08 23:50:12 +01:00
Emmanuele Bassi
107e49002d Check for mlock()
We use it in the secure memory allocator, if it's available.
2020-09-08 23:50:12 +01:00
Emmanuele Bassi
31a7574544 Import egg-secure-memory allocator from gcr
We can re-use the code inside gcr, as we know that it's working, tested,
and license compatible.
2020-09-08 23:50:12 +01:00
Emmanuele Bassi
859df747ac Merge branch 'sorter-constructor-fix-warning' into 'master'
Fix warning in listview_settings demo

See merge request GNOME/gtk!2544
2020-09-08 17:54:25 +00:00
Andreas Persson
81c835c418 Fix warning in listview_settings demo
Fix a warning introduced when sorter constructors were changed to return
exact types.
2020-09-08 18:48:54 +02:00
Ask Hjorth Larsen
33e633cc5c Updated Danish translation of gtk-properties 2020-09-08 16:23:16 +02:00
Ask Hjorth Larsen
73b46eafe1 Updated Danish translation of gtk 2020-09-08 16:23:05 +02:00
Marek Černocký
710ef690ec Updated Czech translation 2020-09-08 15:33:40 +02:00
Matthias Clasen
cb2b0688ca Merge branch 'filter-constructors' into 'master'
Filter constructors

See merge request GNOME/gtk!2360
2020-09-08 12:58:27 +00:00
Danial Behzadi
45c61fdbe3 Update Persian translation 2020-09-08 12:50:36 +00:00
Alexandre Franke
ec49b68257 Update French translation 2020-09-08 09:15:19 +00:00
Alexander Larsson
0092a08dfc gtk-demo: Add shadertoy demo
This adds a small demo of using OpenGL shaders, it renders a quad
over the entire widget with a custom fragment shader. The coordinates
and the uniform names are compatible with the ones on shadertoy.com
(although some features, like texture inputs are missing currently).

The default shader in the demo is
https://www.shadertoy.com/view/wsjBD3 which is CC0, so it is
redistributable by Gtk+ (most other shaders are CC-BY-NC-SA which
isn't obviously compatible). I also added a set of buttons loading
a few other CC0 shaders I found.
2020-09-08 09:56:25 +02:00
Matthias Clasen
bab7092a69 Merge branch 'gl-linear' into 'master'
Gl: use linear interpolation

See merge request GNOME/gtk!2523
2020-09-07 21:27:09 +00:00
Matthias Clasen
3b6941b04b Add some tests for the axis-aligned check 2020-09-07 14:22:47 -04:00
Matthias Clasen
fe429ffc45 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!2541
2020-09-07 17:03:27 +00:00
Matthias Clasen
d595c6ab12 gsk: Complain if we fail to realize a renderer
The only likely place where this is going to happen
is if a renderer was explicitly requested with the
GSK_RENDERER environment variable, and in that case,
it is misleading to silently use a different renderer.
2020-09-07 11:18:45 -04:00
Matthias Clasen
2738d5bc93 gsk: Mention gl as valid value for GSK_RENDERER 2020-09-07 11:18:45 -04:00
Matthias Clasen
5a8267dfae text: Set the hotspot for the drag icon
This makes the drag icon align properly with the
dragged text at the beginning of the drag.
2020-09-07 11:18:45 -04:00
Marek Černocký
d03ce22446 Updated Czech translation 2020-09-07 14:34:07 +02:00
Gil Forcada
350051c56e Update Catalan translation 2020-09-07 10:31:39 +00:00