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

Tray symbols disappear after switching monitor outputs #3317

Closed
manueljacob opened this Issue Jun 29, 2018 · 3 comments

Comments

Projects
None yet
5 participants
@manueljacob

manueljacob commented Jun 29, 2018

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

I have tray_output primary in a bar block. When switching from my external monitor to my internal monitor while leaving the primary output unchanged (xrandr --verbose --output DP1 --off --output eDP1 --auto), the tray symbols disappear. Even when switching back (xrandr --verbose --output eDP1 --off --output DP1 --auto --primary), the symbols don't show up until I press Mod1+Shift+r (restart).

Expected Behavior

When switching back to the external monitor (set as primary by xrandr), the tray symbols should be shown.

Also, not showing any symbols if the primary output is off is a bit confusing but you could argue that's exactly what I configured. (EDIT: I think that the behavior described in this paragraph is fine. I shouldn't have distracted from the actual problem which was described in the previous paragraph.)

Reproduction Instructions

Described above.

Environment

Output of i3 --moreversion 2>&-:

Binary i3 version:  4.15 (2018-03-10) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.15 (2018-03-10) (pid 383)to abort…)
Loaded i3 config: /home/manu/.config/i3/config (Last modified: 2018-06-29T21:00:40 CEST, 408 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3

For testing, I've used an almost default config (copied from /etc/i3/config), with tray_output primary inserted into the bar block.

- Linux Distribution & Version: Arch Linux (rolling release)
- Are you using a compositor (e.g., xcompmgr or compton): no

I sometimes encounter other issues with tray symbols and switching monitors (in particular, the Pidgin symbol disappears sometimes and even restarting i3 doesn't help; only restarting Pidgin helps). However, the issue described here is the only one that I could reproduce reliably.

@i3bot i3bot added the enhancement label Jun 29, 2018

@bebehei

This comment has been minimized.

Contributor

bebehei commented Jul 9, 2018

I'm experiencing the exact same problem for a longer time and have had a few unsuccessful tries debugging the code.

But today, I found the bad codebit. I'll fire a PR.

I guess #2957 is related.

bebehei added a commit to bebehei/i3 that referenced this issue Jul 9, 2018

If no trayoutput matches, take first
When changing the screen, the tray was searching for a matching output.
But if no screen matched, it neglected the setting and didn't show
anything.

As the default, the i3bar shows a tray on the first matching output.
Its intention is to display a tray. So it should also show a tray, if
the monitors don't match.

Fixes i3#3317

@orestisf1993 orestisf1993 added bug 4.15 and removed enhancement labels Jul 9, 2018

@manueljacob

This comment has been minimized.

manueljacob commented Jul 10, 2018

What part did the PR intend to fix? Showing the tray symbols when switching back to the primary monitor (not requiring restart)? Showing the tray symbols somewhere if the primary monitor is off? Both?

@Airblader

This comment has been minimized.

Member

Airblader commented Jul 10, 2018

It was this part:

Showing the tray symbols somewhere if the primary monitor is off?

More specifically, the PR would've shown the tray on the first available output if you specified tray_output primary but didn't have an active primary output.

The reasons why the PR has not been merged can be seen in the discussion there. The PR is IMHO unrelated to the issue of the tray not showing up when switching back to the primary output.

On a side note, does it work if you split switching back to the external monitor up like this?

xrandr --verbose --output eDP1 --off --output DP1 --auto
xrandr --verbose --output DP1 --primary

bebehei added a commit to bebehei/i3 that referenced this issue Sep 16, 2018

Allow "any" as tray_output specifier
If no tray_output specified, i3bar automatically shows on the first
encountered display a tray_output.

But when specifying tray_output, it's not possible to add a fallback
tray_output, which matches any screen.

So specifying "tray_output primary" will require a primary monitor to
exist and be available. "any" provides an easy fallback.

Fixes i3#3317

orestisf1993 added a commit to orestisf1993/i3 that referenced this issue Oct 11, 2018

Close & reopen tray selwin when needed
Fixes i3#1329
Fixes i3#3317 (duplicate)
Examples where the tray "disappeared":
- Start without a "tray_output", reload config with "tray_output none",
remove "tray_output none" and reload.
- Start with "tray_output primary" (or "tray_output <output>"), disable
the primary output and then reconnect it.

Fixes i3#2010
Cached in output_for_tray

orestisf1993 added a commit to orestisf1993/i3 that referenced this issue Oct 23, 2018

Close & reopen tray selwin when needed
Fixes i3#1329
Fixes i3#3317 (duplicate)
Examples where the tray "disappeared":
- Start without a "tray_output", reload config with "tray_output none",
remove "tray_output none" and reload.
- Start with "tray_output primary" (or "tray_output <output>"), disable
the primary output and then reconnect it.

Fixes i3#2010
Cached in output_for_tray
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment