-
Notifications
You must be signed in to change notification settings - Fork 614
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
[BUG] Librewolf window is not focused after launching with drun #2016
Comments
What window manager do you use? With f.e. i3 |
Using Mutter and X11, I have click to focus enabled and have a border hint so I can tell with the window. |
Can you test this patch against git? see if it helps for drun mode? diff --git a/source/modes/drun.c b/source/modes/drun.c
index c18d8f95..5ed1a45a 100644
--- a/source/modes/drun.c
+++ b/source/modes/drun.c
@@ -53,6 +53,8 @@
#include "settings.h"
#include "timings.h"
#include "widgets/textbox.h"
+
+#include "xcb-internal.h"
#include "xcb.h"
#include "rofi-icon-fetcher.h"
@@ -1213,9 +1215,13 @@ static ModeMode drun_mode_result(Mode *sw, int mretv, char **input,
switch (rmpd->entry_list[selected_line].type) {
case DRUN_DESKTOP_ENTRY_TYPE_SERVICE:
case DRUN_DESKTOP_ENTRY_TYPE_APPLICATION:
+ xcb->focus_revert = 0;
+ rofi_view_hide();
exec_cmd_entry(&(rmpd->entry_list[selected_line]), NULL);
break;
case DRUN_DESKTOP_ENTRY_TYPE_LINK:
+ xcb->focus_revert = 0;
+ rofi_view_hide();
launch_link_entry(&(rmpd->entry_list[selected_line]));
break;
default:
@@ -1225,6 +1231,9 @@ static ModeMode drun_mode_result(Mode *sw, int mretv, char **input,
*input[0] != '\0') {
RofiHelperExecuteContext context = {.name = NULL};
gboolean run_in_term = ((mretv & MENU_CUSTOM_ACTION) == MENU_CUSTOM_ACTION);
+ xcb->focus_revert = 0;
+ rofi_view_hide();
+
// FIXME: We assume startup notification in terminals, not in others
if (!helper_execute_command(NULL, *input, run_in_term,
run_in_term ? &context : NULL)) { |
it could also be mutters focus stealing prevention.. do you get a 'window is ready' notification? |
Looking at the journal this is all I get :
It's strange because regular Firefox shifts focus the to window correctly when opening as well as all other applications I've tested, Librewolf seems to be the outlier that just wont.
I'm sorry, I'm by no means a developer or familiar with patching and staging git. How would I go about doing and applying this?
Yes that would have been a factor, I do already have a similar extension installed for just that reason however. |
Is librewolf the only flatpak application that does it? Rofi launches every application in an identical manner, so not sure why one would work, and another not. |
Yes, it does seem that way.
This what puzzles me as well. |
Rofi version (rofi -v)
1.7.5
Configuration
https://gist.github.com/Kostrol/e9a7aa3808b6bce40f86f2a180d757a9
Theme
https://gist.github.com/Kostrol/038e20bb18b58153fa13cd3ac1167bd3
Timing report
No response
Launch command
rofi -show drun
Step to reproduce
Expected behavior
browser opens and is immediately focused
Actual behavior
browser window opens but only previous window is in focus
Additional information
No response
Using wayland display server protocol
I've checked if the issue exists in the latest stable release
The text was updated successfully, but these errors were encountered: