davatorium / rofi

Rofi: A window switcher, application launcher and dmenu replacement
https://davatorium.github.io/rofi/
Other
13.28k stars 612 forks source link

Windows aren't switching sometimes #557

Closed schvabodka-man closed 7 years ago

schvabodka-man commented 7 years ago

Hi there! I've just encountered an interesting problem. When i was working on arch(manjaro) rofi works ok, but now i switched to fedora, and sometimes when i try to switch window with rofi -show window it's just not switching. Just nothing is happening at all. My WM is i3, OS is Fedora 25

Version

1.3.1

Launch Command

rofi -show window -hide-scrollbar -fullscreen

Steps to reproduce

Just try to switch window with rofi window and sometimes(30-40%) it will not switch

What behaviour you see

Window aren't switching

What behaviour you expect to see

Window are switching!

DaveDavenport commented 7 years ago

Can you give a bit more information? for example the version of i3? With a very outdated I3 this behaviour is to be expected.

NoahLutz commented 7 years ago

I have also been having this problem on Arch Linux running BSPWM version 0.9.2-19-gada559d. When I use window or windowcd to switch between windows, I sometimes need to do it multiple time in order to actually switch. When it doesn't switch, the rofi menu just exits and nothing happens.

Let me know if there's any other info I can provide that would be helpful

Version

Version: 1.3.1-240-g98c625f-dirty (makepkg)

Configuration

Configuration

Launch Command

rofi -show window -no-fixed-line-nums rofi -show windowcd -no-fixed-line-nums

Steps to reproduce

What behaviour you see

What behaviour you expect to see

DaveDavenport commented 7 years ago

weird. Rofi calls xcb_ewmh_Request_change_active_window, so if bspwm is ewmh it should work.

Is this a new/recent problem?

(With BSP within Xephyr I am unable to reproduce this)

DaveDavenport commented 7 years ago

When does this problem occurs? when switching between windows on the same desktop, or when switching to another desktop? or is it independent of that?

NoahLutz commented 7 years ago

For me, it happens both when switching between windows in different desktops and when switching windows in the same desktop.

DaveDavenport commented 7 years ago

I have no idea how to debug this. I cannot reproduce this with both i3 or bspwm. As far as I can tell the right API is called.

Can you give more information about Distribution, wm version and X drivers?

Does it happen when certain applications are in focus? or below rofi?

NoahLutz commented 7 years ago

System Info

Here is a video of windowcd not switching. As you can see, right in the beginning, I launch rofi, select the window, and hit enter multiple times for the window to switch.

Here is a video of the same thing occurring while switching to windows in different desktops

As far as I can tell this happens with any application.

Let me know if there's any other version numbers you want or if there's more info I can provide

DaveDavenport commented 7 years ago

Do you have follow mouse enabled (e.g. you move your mouse over another window, this grabs focus)? If you move the mouse to a corner (not over a window) does it also happen?

NoahLutz commented 7 years ago

I don't have follow mouse enabled. I still tried moving my mouse to a corner not over a window and it still occurs.

DaveDavenport commented 7 years ago

Thanks, I could imagine that if rofi removes it window and then switch, the mouse follow might 'block'/'undo' the switch.

This is very curious maybe somebody at @baskerville /bspwm can help figure this one out.

NoahLutz commented 7 years ago

yeah that would make sense. I will submit an issue in the bspwm github page when I get a chance later today.

Thanks for your help.

DaveDavenport commented 7 years ago

I can reproduce this in I3 with spotify on a visible workspace. If this happens I cannot use rofi to switch away. unless I put spotify workspace not on a monitor then it works.

fun

schvabodka-man commented 7 years ago

My OS is Fedora 25, i3wm version 4.13(from fedora copr, it's i3 gaps), rofi version is 1.3.1. Sorry for long response

DaveDavenport commented 7 years ago

Long shot, does the fix for #576 (on rofi master) help for this issue. I noticed my spotify issue is gone (but could also be spotify update).

NoahLutz commented 7 years ago

I just cloned from master and installed and it seems to be fixed for me as well!

DaveDavenport commented 7 years ago

Great!

mzanibelli commented 7 years ago

I can confirm this is fixed ! Thanks !

Additional info (using 1.3.1 release) :

I thought this could be useful somehow ;)

YodaEmbedding commented 7 years ago

Not fixed on 1.3.1. for Arch Linux.

Only occurs with compton --backend glx.

Possibly has something to do with transparency?

DaveDavenport commented 7 years ago

@SicariusNoctis what WM?

I am unsure what happens here, rofi sends the (right?) ewmh signals to the WM how this then handles it.. How compton manages to interfere with this ?

YodaEmbedding commented 7 years ago

@DaveDavenport I'm using i3 WM (config) with compton (config).

bindsym $mod+d exec "rofi -combi-modi window -show combi -modi combi
                         -lines 10 -hide-scrollbar -separator-style none
                         -line-padding 4 -bw 2 -font 'Roboto Mono 14'
                         -kb-row-select 'Tab' -kb-row-tab ''
                    "

Oddly, this behavior is difficult to reproduce on my other laptop, but when it happens, it happens repeatedly until I restart compton.

YodaEmbedding commented 7 years ago

As a workaround for i3 users, I suggest using i3-msg to switch windows. Here is an example binding that uses rofi's -dmenu mode:

bindsym $mod+d exec "wmctrl -l |
                         rofi -dmenu -i |
                         cut -d ' ' -f1 |
                         xargs -I {} i3-msg '[id=\\"{}\\"] focus'
                    "

What method of window switching does rofi currently use?

This might be an upstream bug.

DaveDavenport commented 7 years ago

@SicariusNoctis see 2 comments ago and 3rd from top. more details:

It sends the EWHM signal: xcb_ewmh_request_change_active_window. (I3 is on the quircks list, for other WMs it also sends the xcb_ewmh_request_change_current_desktop but earlier bug reports indicated this causes some problems with i3).

mgrechukh commented 6 years ago

not fixed in rofi 1.3.1.2 on i3wm 4.15 (ubuntu 18.04)

DaveDavenport commented 6 years ago

@mgrechukh can you try with an update rofi? (1.3.1 is almost 1.5 years old) For me it works fine with current rofi on ubuntu 18.04.

mgrechukh commented 6 years ago

Yes, on 1.5.1 it works like a charm!

thank you very much

DaveDavenport commented 6 years ago

thx good to hear.

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.