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
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.
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
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
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.
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
When we start a dnd of the selection in the drag-update handler,
set the gesture state to denied. Otherwise, we get more drag-update
signals, and things get really confused, leading to no dnd and
sadness.
Removed sentence that claimed the view will wrap the model in a
GtkSingleSelection, as it's no longer true. Fixed the code example in
GtkListView for the same reason. Fixed a small typo in GtkDropDown docs.
We were connecting signal handlers to the display
and seats here, and never cleaning them up, leading
to crashes after the inspector is closed. This is
fairly easy to reproduce under Wayland, where the
scroll device is only created the first time we
create a scroll event.
Declarations, definitions, and gtk-doc stanzas should use the same name
for arguments. Otherwise both g-ir-scanner and gtk-doc will complain
that they can't find the argument.
My previous change here was too hasty - this code is not
actually transforming points - it is just a convoluted
way to transform the z axis from child coordinates to
the parent.