We are not emitting these events anymore, so lets remove them
from the api. The GdkSettingAction enum is moved to xsettings-client.c
where its only use remains.
This commit adds gdk_display_get_setting and a ::setting-changed
signal, which will replace the settings event we use now. Note
that I've done away with the GdkSettingAction argument that the
event has, since we are not using it at all.
On Windows, when IME is used, each keystroke results in the
WM_IME_COMPOSITION event being sent first. This means that in our case
when one decides on to accept the input that is in the preedit buffer,
we first get from Windows the WM_IME_COMPOSITION event
(where we emit the commit signal), followed by the WM_IME_ENDCOMPOSITION
event (where we emit the pair of preedit-changed and preedit-end
signals).
Since commit f11f989 (GtkEntry: Remove recompute idle), we do the input
recomputation directly, this will cause a pair of "Pango-WARNING:
Assertion failed: (index >= 0 && index <= layout->length)" being shown,
as gtkentry.c's priv->preedit_length and priv->preedit_cursor was unable
to be reset to 0 in time as a result of the recomputation triggered by
the commit being done before the reset of priv->preedit_length and
priv->preedit_cursor (which are no longer valid as we essentially say
that we are done with the preedit buffer).
As we could only acquire the final string that was entered in this
preedit session when we handle the WM_IME_COMPOSITION event, fix this by
saving up the final string we acquire from Windows IME in UTF-8 when we
handle the WM_IME_COMPOSITION event from Windows, and emit the commit
signal with that string after we emit the preedit-changed and
preedit-end signals when we handle the WM_IME_ENDCOMPOSITION event from
Windows, which comes afterwards.
Also fix the formatting of the code around the parts of the files that
was changed.
https://bugzilla.gnome.org/show_bug.cgi?id=787142
When a widget unparents its child widget manually in finalize, this can
lead to the parent-set signal being emitted for those child widgets. The
parent already has a ref_count of 0 though, so it can't be used in a
meaningful way. Specifically, emitting the signal will already try to
ref the parent which prints a critical.
Since GtkWidget already has a "parent" property, one can use its notify
signal instead to get notified when the parent widget changes.