Skip to content
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

Window manager stuck in loop cycling through spaces #19

Closed
dcolish opened this issue Oct 26, 2012 · 11 comments
Closed

Window manager stuck in loop cycling through spaces #19

dcolish opened this issue Oct 26, 2012 · 11 comments

Comments

@dcolish
Copy link

dcolish commented Oct 26, 2012

If I use WorkspaceWithClient or WorkspaceGreedyWithClient to move a window from a workspace with more than one window from at least two distinct applications, wingo will begin to cycle through the workspaces endlessly. If I have two xterm windows and move one, I do not see the same issue. A single window will also not reproduce it. I've pasted a snippet from my xsession-error.log below.

WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'Google - Conkeror' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'xterm' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'Google - Conkeror' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'xterm' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'Google - Conkeror' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'xterm' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'Google - Conkeror' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'xterm' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'Google - Conkeror' is trying to map itself, but Wingo doesn't think it was iconified.
[xgbutil] xgbutil.go:218: BadWindow {NiceName: Window, Sequence: 28952, BadValue: 18874482, MinorOpcode: 0, MajorOpcode: 10}
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'xterm' is trying to map itself, but Wingo doesn't think it was iconified.
[xgbutil] xgbutil.go:218: BadWindow {NiceName: Window, Sequence: 29081, BadValue: 18874482, MinorOpcode: 0, MajorOpcode: 12}
[xgbutil] xgbutil.go:218: BadWindow {NiceName: Window, Sequence: 29094, BadValue: 18874482, MinorOpcode: 0, MajorOpcode: 8}
[xgbutil] xgbutil.go:218: BadWindow {NiceName: Window, Sequence: 29123, BadValue: 18874482, MinorOpcode: 0, MajorOpcode: 42}
[xgbutil] xgbutil.go:218: BadWindow {NiceName: Window, Sequence: 29124, BadValue: 18874482, MinorOpcode: 0, MajorOpcode: 25}
[xgbutil] xgbutil.go:218: BadWindow {NiceName: Window, Sequence: 29202, BadValue: 18874482, MinorOpcode: 0, MajorOpcode: 42}
[xgbutil] xgbutil.go:218: BadWindow {NiceName: Window, Sequence: 29203, BadValue: 18874482, MinorOpcode: 0, MajorOpcode: 25}
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'emacs@omega' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'xterm' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'emacs@omega' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'xterm' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'emacs@omega' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'xterm' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'emacs@omega' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'xterm' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'emacs@omega' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'xterm' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'emacs@omega' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'xterm' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'emacs@omega' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'xterm' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'emacs@omega' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'xterm' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'emacs@omega' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'xterm' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'emacs@omega' is trying to map itself, but Wingo doesn't think it was iconified.
WINGO WARNING: event.go:62: POSSIBLE BUG: Client 'xterm' is trying to map itself, but Wingo doesn't think it was iconified.
@BurntSushi
Copy link
Owner

Whoa. Which two applications do you have open?

@BurntSushi
Copy link
Owner

Do you have any other clients running? Like docks, panels, etc. If so, which ones?

@dcolish
Copy link
Author

dcolish commented Oct 26, 2012

The only other application running is dzen2. Here's my xsession script if that helps

ssh-add
amixer set Master 00% unmute
# xrandr --output VGA1 --auto --output LVDS1 --auto

xscreensaver -no-splash &
xset b off &
synclient TouchPadOff=1

conky -c ~/.xmonad/conkyrcdzen | /usr/bin/dzen2 -fn '-xos4-terminus-bold-r-normal--12-*-*-*-*-*-*-' -bg '#000000' -y -1 -h 22 -sa r -e '' -ta c &

export DE=generic
export BROWSER=/usr/bin/conkeror

xsetroot -cursor_name left_ptr
exec ck-launch-session /usr/lib/go/bin/wingo

@BurntSushi
Copy link
Owner

Sorry to be pedantic, but since I haven't been able to re-create this yet, I need very specific details.

The very best scenario is one in which you can re-create this problem in the most simple environment possible. For instance, you said "move a window from a workspace with more than one window from at least two distinct applications". Does this include dzen2? Does it happen with any two distinct applications (within reason)? Can you give me a precise example? i.e., if workspace A is your current workspace and workspace B is the workspace you want to move a client to, then:

Which windows, including docks/panels, are visible on workspace A?

Which window are you trying to move?

Which windows are already on workspace B?

Do you have more than one monitor?

Could you post the contents of ~/.xmonad/conkyrcdzen?

Note that Mod4-Space which will show the SelectClient prompt, should help you quickly identify which windows are on which workspace (not including docks/panels).

@dcolish
Copy link
Author

dcolish commented Oct 27, 2012

The windows on workspace A are a terminal, emacs and my dzen2 conkey bar. I wasnt really thinking of that as a window and the SelectClient prompt doesnt show it in the list. If I move the emacs window to workspace B the error occurs. Workspace B was empty except for the dzen2 bar which will be there when I move workspaces. It is global. I only have one monitor.

Here's my conkey script

background no
update_interval 1
no_buffers yes
out_to_x no
out_to_console yes
uppercase no
cpu_avg_samples 2
net_avg_samples 1
text_buffer_size 512
use_spacer right

TEXT
^fg(lightblue)${time %H:%M:%S}^p(5)::^p(5)${time %d %b. %Y}^p(5),^p(5)${time %A}^p(5)^fg(lightblue)^p(6)^i(/home/dcolish/share/xbm/xbm8x8/spkr_01.xbm)^p(5)$mixer^p(5)::^p(5)^i(/home/dcolish/share/xbm/xbm8x8/bat_full_01.xbm)^p(5)${battery_bar}^p(5)::^p(5)^i(/home/dcolish/share/xbm/xbm8x8/cpu.xbm)^p(5)${cpubar 0,5}^p(5)::^p(5)^i(/home/dcolish/share/xbm/xbm8x8/mem.xbm)^p(5)${membar 0,5}^p(5)::^p(5)/ ${fs_bar 0,4 /} /home ${fs_bar 0,4 /home}^p(5)::^p(5)${if_existing /proc/net/route eth0}eth0 ${addr eth0}^p(5)D^p(5)${downspeed eth0}^p(5)U^p(5)${upspeed eth0}^p(6)Dld:^p(5)${totaldown eth0}^p(5)Uld:^p(5)${totalup eth0}^p(5)${else}${if_existing /proc/net/route wlan0}wlan0^p(5)${addr wlan0}^p(10)^i(/home/dcolish/share/xbm/xbm8x8/net_down_01.xbm)${downspeed wlan0}^p(5)^i(/home/dcolish/share/xbm/xbm8x8/net_up_01.xbm)^p(5)${upspeed wlan0}^p(5)^fg(white)^i(/home/dcolish/share/xbm/xbm8x8/net_down_03.xbm)^p(5)${totaldown wlan0}^p(5)^fg(white)^i(/home/dcolish/share/xbm/xbm8x8/net_up_03.xbm)^p(5)${totalup wlan0}${endif}

@BurntSushi
Copy link
Owner

I've re-created your environment exactly but still cannot reproduce the bug. Dammit. This makes it really hard to fix.

A couple more questions:

Does this happen with any two distinct apps? What about another terminal and a file manager? (Or whatever.)

When the workspaces cycle, does the window you moved cycle too? Or is it just the workspaces? Can you stop the cycling by issuing a workspace command? (i.e., try to move to your first workspace or something.)

Are any of the workspaces empty? (Don't include docks/panels here.)

What version of Go do you have installed? (Run go version. Or if you're on Archlinux and installed from the AUR, just say so---I'll know that you used 1.0.3.)

@ghost
Copy link

ghost commented Oct 30, 2012

I'm seeing this when I have focus_follows_mouse := yes set.

@dcolish
Copy link
Author

dcolish commented Oct 30, 2012

Ah ha! I have that set too. I probably should have included a full wingo config before.

@BurntSushi
Copy link
Owner

dcolish, could you check out my previous comment?

Also, I think I'm going to have to ask for your config/options.wini. I've tried enabling focus_follows_mouse, but I still can't recreate it.

Also, could you post the command you're using to start Wingo?

@BurntSushi
Copy link
Owner

Aha! I've reproduced the bug. I set default_layout := Vertical since I had been testing everything in a floating layout until now.

@BurntSushi
Copy link
Owner

All right, I've committed a fix. The problem was that in a tiling layout, when you switched to the next workspace, the currently focused window was added to the next workspace and the tiling layout is refreshed. Therefore, your mouse "enters" into the other window in the layout before the workspace actually changes. So right after the workspace changes, the window on the previous workspace requests focus---which changes the workspace right back. This ends up causing a loop that doesn't cycle all workspaces, but switches back and forth between two workspaces indefinitely.

The fix is simple: ignore EnterNotify events when the window isn't mapped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants