-
Notifications
You must be signed in to change notification settings - Fork 270
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
Workaround lost windows focus in GNOME #15334
Conversation
Bug report: https://bugzilla.opensuse.org/show_bug.cgi?id=1202103 Opening windows from desktop runner might open windows without a focus. That causes typing failures in `xterm` for instance.
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files |
This should work and I have scope it only for I will need to update the needles accordingly as well. |
# workaround for lost focus in GNOME | ||
# bsc#1202103 - [Build 20220803-2] GNOME: lost window focus | ||
if ($program eq 'xterm') { | ||
foreach my $property (@{$match->{needle}->{properties}}) { |
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.
Is it possible to use $match->has_property('workaround')
here? I would need to serialize the object first?
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.
Sorry, I don't know that. At best we can avoid this. How about
click_lastmatch() if match_has_tag('unfocussed');
As you can add multiple tags to needles. This way you also don't need the unusual handling of the assert_screen return value
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.
Yup, that is another solution, adding new elements (xterm-unfocussed
) into @target
. I do not really have any preference over here, but it seems fine just to add a workaround property for GNOME's xterm needle.
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.
Well, if you don't have a preference may I please ask you to implement my suggestion as that relies less on internals but only the stable API and should therefore be more reliable
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
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.
See latest suggestions
Bug report: https://bugzilla.opensuse.org/show_bug.cgi?id=1202103
Opening windows from desktop runner might open windows without a focus.
That causes typing failures in
xterm
for instance.