-
Notifications
You must be signed in to change notification settings - Fork 147
app,io,widget: [android/macos] fix focus issues #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This patch is intended to fix two issues related to focus and software-keyboard. The focus is now reseted if it's lost due to external event, such as clicking on non-Gio window/activity/fragment. The software-keyboard will now re-open when clicked, except if it's ReadOnly. On macOS it will request focus again if the focus is lose due to another View in the same Window. However, currently, it's done by using ShowTextInput. Fixes: https://todo.sr.ht/~eliasnaur/gio/591 Signed-off-by: inkeliz <[email protected]>
- (void)windowDidBecomeKey:(NSNotification *)notification { | ||
NSWindow *window = (NSWindow *)[notification object]; | ||
GioView *view = (GioView *)window.contentView; | ||
gio_onFocus(view.handle, 1); | ||
GioView *view = (GioView *)window.contentView; | ||
if ([window firstResponder] == view) { | ||
gio_onFocus(view.handle, 1); | ||
} | ||
} | ||
- (void)windowDidResignKey:(NSNotification *)notification { | ||
NSWindow *window = (NSWindow *)[notification object]; | ||
GioView *view = (GioView *)window.contentView; | ||
gio_onFocus(view.handle, 0); | ||
GioView *view = (GioView *)window.contentView; | ||
if ([window firstResponder] == view) { | ||
gio_onFocus(view.handle, 0); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reason to change: This is relative to the window, not the view. If you have multiple views in the same window, it used to incorrectly report that Gio had the focus.
if !e.ReadOnly { | ||
gtx.Execute(key.SoftKeyboardCmd{Show: true}) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't make sense to request SoftKeyboard when it's ReadOnly. Maybe I need to do it on a separated commit?
func (w *window) ShowTextInput(show bool) { | ||
if show && !w.config.Focused { | ||
C.setFocus(w.view) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is macOS, which doesn't have SoftwareKeyboard. However, I didn't find any specific function to request focus, and adding a new function will require changes on multiple OSes, even as no-op
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why you need this here and not on other desktop platforms. Why can't C.setFocus
be called automatically in the cases where focus was lost?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's possible to call it when the GioView is clicked, and doesn't have focus. I don't think Gio should immediate request for Focus, because it's possible to have multiple non-Gio View in the same Window.
Extracted from #138 by inkeliz. Signed-off-by: Elias Naur <[email protected]>
Extracted from #138 by Inkeliz. References: https://todo.sr.ht/~eliasnaur/gio/591 Signed-off-by: Elias Naur <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I extracted the non-controversial changes, leaving only the two that confuse me. Please rebase.
e := &evts[i] | ||
if fe, ok := e.event.(key.FocusEvent); ok { | ||
if !fe.Focus { | ||
state.keyState.focus = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me this should be done in Router.processEvent
, near the lines
case key.EditEvent, key.FocusEvent, key.SelectionEvent:
var evts []taggedEvent
if f := state.focus; f != nil {
evts = append(evts, taggedEvent{tag: f, event: e})
}
q.changeState(e, state, evts)
But I'm not perfectly sure what use-case you're fixing. Can you add a test to io/input/key_test.go for my understanding and to guard against regressions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I'm fixing is reseting the focus
when receiving key.FocusEvent
from "the OS".
Consider that you have one FocusCmd{Tag: TextArea}
. If Gio gets one FocusEvent
from "the OS" (say: macos), it will not remove the focus from TextArea
. That is the issue here.
So, this change changes the state
(state.keyState.focus
) to nil
when the FocusEvent is false
. Since it's messing with state
I use the changeState
function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changeState
doesn't change state per se, it adds it to the list of states. A better name would be addStateChange
.
See https://github.com/gioui/gio/pull/138/files/101cf1aa478601e9c823f86a86b652b09d768a56#diff-c04c544d7677b4f40b53717995fb8f2e3d67212768e651e229ef2c020fc0d357L434 where state is changed by processEvent
, in response to a pointer.Event
.
func (w *window) ShowTextInput(show bool) { | ||
if show && !w.config.Focused { | ||
C.setFocus(w.view) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why you need this here and not on other desktop platforms. Why can't C.setFocus
be called automatically in the cases where focus was lost?
f8029f2
to
026d3f9
Compare
3d36537
to
74ccc9c
Compare
* app: [macOS] ignore focus changes not meant for the Gio view Extracted from gioui#138 by inkeliz. Signed-off-by: Elias Naur <[email protected]> * widget: show software keyboard when a writable Editor is clicked Extracted from gioui#138 by Inkeliz. References: https://todo.sr.ht/~eliasnaur/gio/591 Signed-off-by: Elias Naur <[email protected]> * .builds: increase file descriptor limit for Android's sdkmanager Signed-off-by: Elias Naur <[email protected]> * app: queue system actions before first call to Event() This commit ensures that attempting to perform a system window action prior to the first call to Event() does not panic. It adopts a similar strategy to handling Option() prior to the first call to Event(): make a slice of the arguments and apply them during window initialization. Fixes: https://todo.sr.ht/~eliasnaur/gio/593 Signed-off-by: Chris Waldon <[email protected]> * io/input: improve documentation, code Signed-off-by: Elias Naur <[email protected]> * io/input: deliver all observed events before deferring the rest Even when a command defers event delivery to the next frame, the already observed events must still be delivered in the current frame. This matters for pointer events that hit more than one event handler. Fixes: https://todo.sr.ht/~eliasnaur/gio/594 Signed-off-by: Elias Naur <[email protected]> * app: reset Window when DestroyEvent is received Fixes: https://todo.sr.ht/~eliasnaur/gio/595 Signed-off-by: Elias Naur <[email protected]> * app: ignore Invalidate for Windows not yet created While here, don't overflow the Windows event queue. Fixes: https://todo.sr.ht/~eliasnaur/gio/596 Signed-off-by: Elias Naur <[email protected]> * app: use empty frame when FrameEvent.Frame isn't called Signed-off-by: Elias Naur <[email protected]> * app: [macOS] fix ANGLE renderering Setting CAMetalLayer.presentWithTransaction to YES breaks ANGLE rendering. Signed-off-by: Elias Naur <[email protected]> * app: add cross-platform empty view event detection Custom rendering applications need to be prepared to handle empty view events, as an empty view event is sent during window shutdown. However, the current implementation requires applications to write a platform-specific helper function for each supported platform in order to check whether a received view event is empty. This commit provides a safe, convenient, cross-platform method that applications can use to detect this special view event and respond to it. Signed-off-by: Chris Waldon <[email protected]> * app: ensure Invalidate can be invoked when window is closing This commit ensures that it is safe to invoke Invalidate() from another goroutine while a Gio window may be in the process of closing. It can be difficult to prevent this from happening, as window handles can easily be managed by a type that doesn't know the exact moment of window close (it might be waiting on the window event loop to return, but that hasn't happened yet). Without this change, the nil window driver results in a panic in this situation. Co-authored-by: Chris Waldon <[email protected]> Signed-off-by: Elias Naur <[email protected]> * app: [Wayland] prevent recursive scroll event processing This commit zeroes the accumulated scroll distance on the window before invoking the event delivery code, since the event delivery code is able to call back into the scroll processing. Prior to this change, the callback could re-processing the scroll delta while magnifying it by a factor of 10. Fixes: https://todo.sr.ht/~eliasnaur/gio/599 Signed-off-by: Chris Waldon <[email protected]> * app: [Windows] suppress double-click behaviour for custom decorations Fixes: https://todo.sr.ht/~eliasnaur/gio/600 Signed-off-by: Elias Naur <[email protected]> * go.mod: update golang.org/x dependencies This gets rid of a CVE warning about golang.org/x/image/tiff. Signed-off-by: Egon Elbre <[email protected]> * Revert "app: [Windows] suppress double-click behaviour for custom decorations" This reverts commit 82cbb7b. As Egon Elbre points out in https://todo.sr.ht/~eliasnaur/gio/600#event-377179 this is not the right fix. Signed-off-by: Elias Naur <[email protected]> * io/input: fix typo Signed-off-by: Elias Naur <[email protected]> * app: [Windows] remove redundant code Signed-off-by: Elias Naur <[email protected]> * app: [Windows] don't draw after WM_DESTROY destroyed the window There may be a window of time from WM_DESTROY is received to the WM_QUIT message is delivered by PostQuitMessage. If so, we must not call w.draw. Fixes: https://todo.sr.ht/~eliasnaur/gio/603 Signed-off-by: Elias Naur <[email protected]> * app: [macOS] track window state changes initiated by the operating system Before this change, the window state was explicitly updated whenever Window.Option was called. However, the system may also change window state as a result of user gestures, but those changes did not result in ConfigEvents reflecting them. Remove the explicit state updates and track them when the system tells us it has changed. This is a step towards fixing #600 which require accurate window state tracking. References: https://todo.sr.ht/~eliasnaur/gio/600 Signed-off-by: Elias Naur <[email protected]> * app: [Windows] track window state changes initiated by the OS Like the previous change, update the Windows backend to track and report window state changes initiated by the OS. References: https://todo.sr.ht/~eliasnaur/gio/600 Signed-off-by: Elias Naur <[email protected]> * widget: [API] change Decorations to leave the user in control of window state As suggested by ~egonelbre, Decorations should not be the source of truth for the windows state, because external gestures may also change state. This breaking change removes Decorations.Perform and exposes Maximized as a bool which is the user's responsibility to set. Fixes: https://todo.sr.ht/~eliasnaur/gio/600 Signed-off-by: Elias Naur <[email protected]> * app: [Windows] remove redundant code Change f7aa4b5 changed the fullscreen implementation to no longer require the position and size of the fullscreen window. Signed-off-by: Elias Naur <[email protected]> * layout,io/input: [API] change Context.Disabled to only disable events Also unexport Source.Enabled because the nil-ness of its embedded router is now an implementation detail. Fixes: https://todo.sr.ht/~eliasnaur/gio/605 Signed-off-by: Elias Naur <[email protected]> * app: close the window before reporting a GPU error When a GPU error occurs forcing the reporting of a DestroyEvent is not appropriate, because the backend that controls the underlying window is not aware of the error and will continue to report events. Replace the crude DestroyEvent by stashing the error and asking the window nicely to close. The, report the stashed error in the otherwise regular DestroyEvent. Hopefully, this second attempt fixes #603. Fixes: https://todo.sr.ht/~eliasnaur/gio/603 Signed-off-by: Elias Naur <[email protected]> * Revert "app: [Windows] don't draw after WM_DESTROY destroyed the window" This reverts commit 635df37 because it didn't fix #603 after all. Signed-off-by: Elias Naur <[email protected]> * text,widget/material: Update doc for Shaper & Theme Note that you should use different Themes, with different Shapers, for different top-level windows, and explain why. Signed-off-by: Larry Clapp <[email protected]> * app: [Windows] don't ignore Min|MaxSize options The support for minimum and maximum window sizes were broken by a recent change. Found while investigating #608. References: https://todo.sr.ht/~eliasnaur/gio/608 Signed-off-by: Elias Naur <[email protected]> * app: [Windows] compute min, max window sizes correctly when un-minimzing Fixes: https://todo.sr.ht/~eliasnaur/gio/608 Signed-off-by: Elias Naur <[email protected]> * app: [Window] don't report Win32ViewEvent before window configuration Fixes: https://todo.sr.ht/~eliasnaur/gio/609 Signed-off-by: Elias Naur <[email protected]> * go.*: update typesetting for unifont panic fix This commit updates our typesetting dependency to avoid a crash when shaping GNU unifont. Thanks to Jeff Williams for raising the issue on the mailing list. Signed-off-by: Chris Waldon <[email protected]> * app: [android] fix compatibility with older Android versions Previously, setHighRefreshRate requires APIs restricted to Android 30, or higher. Tested on Android 6.0.1 (released on 2015). Signed-off-by: inkeliz <[email protected]> * app: [android] ensure a new frame is always scheduled when visible and animating Possible fix to #614. References: https://todo.sr.ht/~eliasnaur/gio/614 Signed-off-by: Elias Naur <[email protected]> * app: remove dead code Signed-off-by: Elias Naur <[email protected]> * app: [macos] don't relay key events handled by the IME Widgets such as Editor use certain key events such as the backspace key to implement text editing. On macOS, such key events are sometimes used by an input method, and in those cases the key effect would be applied twice: first by the IME and then the Editor. Report such key events through the doCommandBySelector callback, which receives key events not handled by the IME. References: https://todo.sr.ht/~eliasnaur/gio/616 Signed-off-by: Elias Naur <[email protected]> * app: fix typo Signed-off-by: Elias Naur <[email protected]> * app: fix race condition between Window.Invalidate and event loop References: https://todo.sr.ht/~eliasnaur/gio/603 Signed-off-by: Elias Naur <[email protected]> * app: [windows] ensure no callbacks after DestroyEvent Setting the callback handler to nil in DestroyEvent should have no effect, but may help debugging #603. Also don't call the default window handler for WM_DESTROY since we're already handling it. References: https://todo.sr.ht/~eliasnaur/gio/603 Signed-off-by: Elias Naur <[email protected]> * gpu: remove compute renderer The compute renderer is a failed experiment: a better port of the Vello vector renderer exists[0] and the upcoming Go 1.24 release no longer builds the gioui.org/cpu module because of #60725. Remove it. [0] https://github.com/dominikh/jello Signed-off-by: Elias Naur <[email protected]> * internal/vk: remove methods on C types, for Go 1.24 compatibility Go 1.24 no longer allows methods on C types (golang.org/issue/60725). Signed-off-by: Elias Naur <[email protected]> * app: [macOS] send keypress events for modifier keys This change generates keypress and release events for modifier keys in macOS. Specifically the Control, Alt, Shift and Command keys. Signed-off-by: Jeff Williams <[email protected]> * flake.*: upgrade to nixpkgs 24.11 Signed-off-by: Elias Naur <[email protected]> * [text, font] Bump go-text version to 0.2.1 Signed-off-by: Benoit KUGLER <[email protected]> * text: use upstream bidi visual order algorithm We've migrated the processing of bidi run ordering into the upstream typesetting package, so now we can just consume the already-ordered runs instead of computing their ordering ourselves. Signed-off-by: Chris Waldon <[email protected]> * widget: update text indexing expectations The typesetting package has smarter line wrapping now, which is making our test text require fewer lines to display. We needed to update the expected data accordingly. I've also added a feature that takes a screenshot of the rendered output of one of our most complex cursoring tests. This will make it much easier to verify its behavior in the future. This feature currently only triggers if the test case fails. Signed-off-by: Chris Waldon <[email protected]> * text: allow disabling space trimming This commit adds a shaping parameter that disables the trimming of trailing whitespace from lines. Text editors and similar use-cases want trailing whitspace glyphs to be selectable, which means they must occupy space. Signed-off-by: Chris Waldon <[email protected]> * widget: ensure editor does not trim trailing whitespace This commit makes the editor widget suppress the trimming of trailing whitespace so that the spaces can be selected intuitively. Signed-off-by: Chris Waldon <[email protected]> * app: [Windows] use NewLazySystemDLL for kernel32.dll In order to avoid DLL preloading attacks, we should always load our system dependencies using the helper that only searches the system library path. Thanks to Mohsen Mirzakhani and Utkarsh Satya Prakash for bringing this to our attention. Signed-off-by: Chris Waldon <[email protected]> * .builds: upgrade FreeBSD builder It's currently failing, and upgrading it may fix it. While here, track lates FreeBSD to avoid upgrade toil. Signed-off-by: Elias Naur <[email protected]> * .builds: work around iOS build failure Later versions of clang no longer accepts our ancient SDK root. Force it by supressing a warning. Signed-off-by: Elias Naur <[email protected]> * internal/{egl,gl}: [Windows] restrict graphics DLL sources In order to avoid DLL preloading attacks, we should be careful about where we load DLLs from. These packages load graphics DLLs, which may be provided by the OS, by a graphics vendor, or even by individual applications. As such, we can't restrict loading them to just system32-provided paths. Instead, we invoke LoadLibraryEx [0] with the LOAD_LIBRARY_SEARCH_DEFAULT_DIRS path, which will search system32, application-defined paths, and the path of the primary application executable. This mode ignores the system %PATH% variable, which dramatically reduces the attack surface of malicious or unintended DLLs. Applications may add custom paths to the search list by calling the standard windows AddDllDirectory function [1] prior to attempting to initialize GL. Thanks to Mohsen Mirzakhani and Utkarsh Satya Prakash for bringing this to our attention. [0] https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryexa [1] https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-adddlldirectory Signed-off-by: Chris Waldon <[email protected]> * app: [macOS] remove support for key bindings The fix for #616 went to far by attempting to support macOS key bindings through doCommandBySelector. Issue #625 is a consequence, but more fundamentally, key bindings does not work with support for key.Release events. Remove key binding translation and fix #626, and add a check whether an IME swallowed a key event, keeping #616 fixed. While here, replace the KEY_ constants with ASCII codes. Fixes: https://todo.sr.ht/~eliasnaur/gio/625 References: https://todo.sr.ht/~eliasnaur/gio/616 Signed-off-by: Elias Naur <[email protected]> * app: [macOS] propagate unhandled key shortcuts By propagation, we restore the system behaviour for shortcuts the program don't want, for example the system beep. Signed-off-by: Elias Naur <[email protected]> * app: [macOS] don't draw when minimized References: https://todo.sr.ht/~eliasnaur/gio/621 Signed-off-by: Elias Naur <[email protected]> * app: [Windows] don't draw minimized windows Fixes: https://todo.sr.ht/~eliasnaur/gio/621 Signed-off-by: Elias Naur <[email protected]> * text: respect line height when layout the last empty line. Text Shaper set the last empty line height to ascent+decent of the paragraph break glyph which causes the last visual empty line to have a smaller line height. This commit tries to fix it by setting the line height using the line height from the last line. References: https://todo.sr.ht/~eliasnaur/gio/629 Signed-off-by: zjzhang <[email protected]> * text: round y offset of trailing newline This commit tries to ensure that trailing newlines do not introduce more vertical space below the text than is occupied by a typical text run within the text. Signed-off-by: Chris Waldon <[email protected]> * all: replace golang.org/x/exp/slices with the standard library package Signed-off-by: Elias Naur <[email protected]> * app: [Windows] hide the maximize button when MaxSize is set Also, disable window frame resizing when MaxSize equals MinSize. Fixes: https://todo.sr.ht/~eliasnaur/gio/631 Signed-off-by: vasijob225 <[email protected]> * app: [macOS] correct error handling for newMtlContext Fixes: https://todo.sr.ht/~eliasnaur/gio/632 Signed-off-by: Elias Naur <[email protected]> * app: fix miss included doc comment License identifier is shown in documentation at[1]. This patch fixes it. 1: https://pkg.go.dev/gioui.org/app#hdr-Permissions Signed-off-by: kurth4cker <[email protected]> * gpu: don't store transformed rectangle paths under the same cache key Fixes incorrect rendering of multiple transformed instances of a rectangle. Fixes: https://todo.sr.ht/~eliasnaur/gio/635 Signed-off-by: Elias Naur <[email protected]> * gpu/internal/rendertest: allow nil pixel check functions Signed-off-by: Elias Naur <[email protected]> * go.*: update typesetting for truncator ordering fix This commit updates our typesetting dependency to a version that properly bidi-orders truncator runs. This fixes an issue in which the truncator symbol could appear on the wrong side of text. Fixes: https://todo.sr.ht/~eliasnaur/gio/634 Signed-off-by: Chris Waldon <[email protected]> * app: [macOS] don't discard IME session for consistent snippets An IME session must be discarded when its text content no longer matches the underlying text component content. However, the check for matching was too pessimistic; the IME session would be discarded if the new snippet from the text component was not equal to the snippet reported to the IME. This change implements a refined check that only discards a session if the content of the overlap between the new and old snippets don't match. Fixes an IME issue reported by Zhang Zj. Signed-off-by: Elias Naur <[email protected]> * layout,io/input: move disabling events from layout.Context to input.Source The fix for #605 moved the disabling of event delivery from Source to Context to enable disabled Contexts to still react to commands (invalidate, focus etc.). However, that change in turn caused #641 where the exported Context.Source field would no longer know not to deliver events. This change partially reverts the fix for #605 by moving disabledness back to Source, fixing #641. Disabled Sources are left capable of executing commands, thus keeping #605 fixed. Thanks to Chris et al for keeping the use-cases straight enough for me to come up with this (hopefully final) fix. Signed-off-by: Elias Naur <[email protected]> Fixes: https://todo.sr.ht/~eliasnaur/gio/641 References: https://todo.sr.ht/~eliasnaur/gio/605 * app: [Wayland] use correct serial for wl_pointer_set_cursor Signed-off-by: Elias Naur <[email protected]> * app: [Wayland] use correct serial for wl_pointer_set_cursor, take 2 To fix #644 the serial passed to wl_pointer_set_cursor must come from the pointer enter event. To do this we need a place to keep the serial so I've added a field to the wlSeat struct to hold on to it. Ref: https://wayland.app/protocols/wayland#wl_pointer:request:set_cursor Ref: https://wayland-book.com/seat/pointer.html Fixes: https://todo.sr.ht/~eliasnaur/gio/644 Signed-off-by: Dave Akers <[email protected]> * app: [Wayland] remove window.seat in favor of wlSeat.pointerFocus Signed-off-by: Dave Akers <[email protected]> * app: [Windows] correctly center window on startup When the window is created position it *before* processing the actions to perform (which may include system.ActionCenter). Note that the actions are performed in the callback windowProc(). Fixes: https://todo.sr.ht/~eliasnaur/gio/646 Signed-off-by: Marcel Juffermans <[email protected]> * io/input/pointer: ignore grab commands for tags that don't have the pointer Without this fix, two gestures that both issue GrabCmd on the same frame will cancel each other. With the fix, the first will win the grab, and the other ignored. References: https://todo.sr.ht/~eliasnaur/gio/647 Signed-off-by: Elias Naur <[email protected]> * io/pointer: remove Foremost priority The only known use-case (nested scrolling) now works without special treatment of the foremost handler. Signed-off-by: Elias Naur <[email protected]> * go.*: bump Go to 1.23, upgrade dependencies Signed-off-by: ddkwork * all: clean up code, upgrade to modern Go Signed-off-by: ddkwork * layout,gesture: add option to handle vertical scroll on horizontal list Previously, it was impossible to scroll a Axis == Horizontal using ordinary mouse-wheel. Now, it's possible to set ScrollAnyAxis == True, which combine scrolling from any direction. That makes possible to scroll Horizontal lists with vertical mouse-wheel. By default this option is false, keeping the old behaviour. Signed-off-by: inkeliz <[email protected]> * flake.*: upgrade to nixpkgs 25.05, use nixpkgs android SDK Signed-off-by: Elias Naur <[email protected]> --------- Signed-off-by: Elias Naur <[email protected]> Signed-off-by: Chris Waldon <[email protected]> Signed-off-by: Egon Elbre <[email protected]> Signed-off-by: Larry Clapp <[email protected]> Signed-off-by: inkeliz <[email protected]> Signed-off-by: Jeff Williams <[email protected]> Signed-off-by: Benoit KUGLER <[email protected]> Signed-off-by: zjzhang <[email protected]> Signed-off-by: vasijob225 <[email protected]> Signed-off-by: kurth4cker <[email protected]> Signed-off-by: Dave Akers <[email protected]> Signed-off-by: Marcel Juffermans <[email protected]> Signed-off-by: ddkwork Co-authored-by: Elias Naur <[email protected]> Co-authored-by: Chris Waldon <[email protected]> Co-authored-by: Egon Elbre <[email protected]> Co-authored-by: Larry Clapp <[email protected]> Co-authored-by: Benoit KUGLER <[email protected]> Co-authored-by: zjzhang <[email protected]> Co-authored-by: vasijob225 <[email protected]> Co-authored-by: kurth4cker <[email protected]> Co-authored-by: Dave Akers <[email protected]> Co-authored-by: Marcel Juffermans <[email protected]> Co-authored-by: Admin <[email protected]>
This patch is intended to fix two issues related to focus and
software-keyboard.
The focus is now reseted if it's lost due to external event,
such as clicking on non-Gio window/activity/fragment.
The software-keyboard will now re-open when clicked, except
if it's ReadOnly.
On macOS it will request focus again if the focus is lose
due to another View in the same Window. However, currently,
it's done by using ShowTextInput.
Fixes: https://todo.sr.ht/~eliasnaur/gio/591