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

Content of workspaces (screen background) visible on others (mplayer) #3795

Open
klartext opened this issue Sep 17, 2019 · 11 comments · May be fixed by #3810
Open

Content of workspaces (screen background) visible on others (mplayer) #3795

klartext opened this issue Sep 17, 2019 · 11 comments · May be fixed by #3810
Assignees
Labels
4.17 bug missing-log Read the CONTRIBUTING.md file for instructions

Comments

@klartext
Copy link

klartext commented Sep 17, 2019

I'm submitting a…

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

Current Behavior

i3 4.17.1: Background of one workspace is visible, when switching to a different workspace.

Expected Behavior

When switching from one workspace, the contents that was seen on the former workspace is not visible anymore.

Reproduction Instructions

Example reproduction:
One workspace with alsamixer that fills the screen (one tile only).
Then switch to a different workspace (I had more than one tile, but I think this does not matter here). If the used tile is not completely used by the program on the newly encountered (switched to) workspace, the contents of the former worksapce frames the new workspace.

Environment

Arch Linux.
Package that works is 4.16.1-1.
Package with the problem is 4.17.1-1.

After finding the problem I downgraded to the older version to be sure, that no other package-installations have caused the problem.
I found out that with downgrading to 4.16.1-1 the problem was gone.
So the problem is a i3-problem.

Output of i3 --moreversion 2>&-:

i3 version: 
Binary i3 version:  4.16.1 (2019-01-27) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.16.1 (2019-01-27) (pid 28339)bort…)
Loaded i3 config: /home/oliver/.i3/config (Last modified: Sa 02 Mär 2019 23:50:22 CET, 17187316 seconds ago)

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

See discussion on i3-mailinglist:
https://www.freelists.org/archive/i3-discuss/09-2019

Screenshots:

a) with the problem:
http://s000.tinyupload.com/?file_id=53830511177154834717
i3-Problem_s

b) after downgrading, expected behaviour:
http://s000.tinyupload.com/index.php?file_id=16308606597116519931
i3-wm_4-16-1_s

@i3bot i3bot added bug missing-log Read the CONTRIBUTING.md file for instructions labels Sep 17, 2019
@i3bot
Copy link

i3bot commented Sep 17, 2019

I don’t see a link to logs.i3wm.org. Did you follow https://i3wm.org/docs/debugging.html? (In case you actually provided a link to a logfile, please ignore me.)

@i3bot i3bot added the 4.17 label Sep 17, 2019
@Airblader
Copy link
Member

As mentioned on the mailing list, since we have a bad and a good version, a git bisect would be helpful to figure out which commit actually causes this.

@klartext
Copy link
Author

klartext commented Sep 25, 2019

OK, I used git bisect to locate the problem.
Here the output:

29f2510fa9484a5fa235de9a1c5c937292151888 is the first bad commit
commit 29f2510fa9484a5fa235de9a1c5c937292151888
Author: Orestis Floros 
Date:   Mon Oct 1 19:47:33 2018 +0300

    Fix aspect ratio bugs
    
    - ICCCM says: > If a base size is not provided, the minimum size is to
    be used in its place and vice versa.
    i3 didn't obey the "vice versa" part. Min size and base size are both
    saved without replacements in window_update_normal_hints,
    floating_check_size makes the needed replacements if either was not
    provided.
    - Aspect ratio is now saved correctly in manage_window because
    window_update_normal_hints is called.
    - i3 didn't save the aspect ratio if the window conformed the given
    aspect ratio range when handle_normal_hints was called. If the window
    was resized to a size outside of the given bounds, i3 didn't correct it.
    - Aspect ratio now affects only tiling windows, like the rest of the
    normal size hints
    - The aspect ratio calculation is now done without a loop
    
    A real life example of how these changes affect the workflow:
    An mpv window, when playing a video, sets its min == max aspect ratio
    during mapping. i3 ignored these hints. When resized, the window's
    aspect ratio was not preserved. With this commit, resizing floating mpv
    windows will always preserve the aspect ratio.

 include/data.h               |   3 +-
 include/floating.h           |  13 +++--
 include/window.h             |   6 ++
 src/commands.c               |   2 +-
 src/con.c                    |   1 -
 src/floating.c               |  85 ++++++++++++++++++++++------
 src/handlers.c               | 130 ++-----------------------------------------
 src/load_layout.c            |   2 +-
 src/manage.c                 |  34 ++---------
 src/render.c                 |  29 ----------
 src/scratchpad.c             |   2 +-
 src/window.c                 | 121 ++++++++++++++++++++++++++++++++++++++++
 testcases/t/133-size-hints.t | 104 +++++++++++++++++++++++++++-------
 13 files changed, 304 insertions(+), 228 deletions(-)

#3432

@Airblader
Copy link
Member

Thanks, that's very helpful!

@orestisfl Maybe you can have a look?

@orestisfl
Copy link
Member

Thanks, I can reproduce this specifically with mplayer. Mpv (so you can use it as a workaround) does not have this issue, I'll try to find where the fault lies.

@orestisfl
Copy link
Member

btw both i3 4.16 and awesomewm have this issue with fullscreen mplayer

@orestisfl orestisfl changed the title Content of workspaces (screen background) visible on others Content of workspaces (screen background) visible on others (mplayer) Sep 27, 2019
@orestisfl orestisfl self-assigned this Sep 27, 2019
@Airblader
Copy link
Member

Yeah, MPlayer is known to be misbehaving, here. I'm fairly sure we discussed this before, and I would guess awesome did as well.

@orestisfl
Copy link
Member

I reverted the behaviour locally, I'll submit a fix soon

orestisfl added a commit to orestisfl/i3 that referenced this issue Oct 1, 2019
Before 29f2510, tiling windows
confronted to their aspect ratio and the windows were centered in their
container.

This commit re-introduces this logic which is implemented differently
than the logic in floating_check_size.

Fixes i3#3795
orestisfl added a commit to orestisfl/i3 that referenced this issue Oct 3, 2019
Before 29f2510, tiling windows
confronted to their aspect ratio and the windows were centered in their
container.

This commit re-introduces this logic which is implemented differently
than the logic in floating_check_size.

Fixes i3#3795
@ghost
Copy link

ghost commented Sep 5, 2020

There is an UPDATE on the next comment. Please, check it out first.

(I'm keeping the lines below just to have more data for testing)

Hey guys, I'm having the same problem with any program running, but only when the workspace is a new one.

Every time I press $mod+[0-9]:

1 - If the workspace already exists (there's at least one application running there), then the behavior is correct.
2 - If the workspace doesn't exist, the background becomes like a "screenshot" of the previous workspace.

Example:

1 - Running Firefox and Terminator on the workspace 2
2 - Pressed $mod1+7
3 - Pressed $mod1+p (my preference to call dmenu)
4 - Typed "terminal" and hit "Enter"

Here's the log for these operations:

09/05/2020 06:47:50 AM - handlers.c:handle_event:1358 - event type 28, xkb_base 85
09/05/2020 06:47:50 AM - _NET_WM_NAME changed to "i3-dump-log"
09/05/2020 06:47:50 AM - Checking window 0x05e0056e (class Terminator)
09/05/2020 06:47:50 AM - dock status does not match
09/05/2020 06:47:50 AM - Checking window 0x05e0056e (class Terminator)
09/05/2020 06:47:50 AM - dock status does not match
09/05/2020 06:47:50 AM - Checking window 0x05e0056e (class Terminator)
09/05/2020 06:47:50 AM - dock status does not match
09/05/2020 06:47:50 AM - Checking window 0x05e0056e (class Terminator)
09/05/2020 06:47:50 AM - dock status does not match
09/05/2020 06:47:50 AM - assignments.c:run_assignments:18 - Checking if any assignments match this window
09/05/2020 06:47:50 AM - x.c:x_push_changes:1164 - -- PUSHING WINDOW STACK --
09/05/2020 06:47:50 AM - x.c:x_push_changes:1237 - PUSHING CHANGES
09/05/2020 06:47:50 AM - con.c:con_border_style_rect:1632 - The border width for con is set to: 5
09/05/2020 06:47:50 AM - con.c:con_border_style_rect:1641 - Effective border width is set to: 5
09/05/2020 06:47:50 AM - con.c:con_border_style_rect:1632 - The border width for con is set to: 5
09/05/2020 06:47:50 AM - con.c:con_border_style_rect:1641 - Effective border width is set to: 5
09/05/2020 06:47:50 AM - x.c:x_push_changes:1330 - ENDING CHANGES
09/05/2020 06:47:50 AM - ipc.c:ipc_send_window_event:1615 - Issue IPC window title event (con = 0x56287ad66f80, window = 0x05e0056e)
09/05/2020 06:47:50 AM - handlers.c:handle_event:1358 - event type 28, xkb_base 85
09/05/2020 06:47:50 AM - Checking window 0x05e0056e (class Terminator)
09/05/2020 06:47:50 AM - dock status does not match
09/05/2020 06:47:50 AM - Checking window 0x05e0056e (class Terminator)
09/05/2020 06:47:50 AM - dock status does not match
09/05/2020 06:47:50 AM - Checking window 0x05e0056e (class Terminator)
09/05/2020 06:47:50 AM - dock status does not match
09/05/2020 06:47:50 AM - Checking window 0x05e0056e (class Terminator)
09/05/2020 06:47:50 AM - dock status does not match
09/05/2020 06:47:50 AM - assignments.c:run_assignments:18 - Checking if any assignments match this window
09/05/2020 06:47:50 AM - x.c:x_push_changes:1164 - -- PUSHING WINDOW STACK --
09/05/2020 06:47:50 AM - x.c:x_push_changes:1237 - PUSHING CHANGES
09/05/2020 06:47:50 AM - x.c:x_push_changes:1330 - ENDING CHANGES
09/05/2020 06:47:50 AM - handlers.c:handle_event:1358 - event type 28, xkb_base 85
09/05/2020 06:47:50 AM - handlers.c:handle_event:1358 - event type 28, xkb_base 85
09/05/2020 06:47:50 AM - handlers.c:handle_event:1358 - event type 28, xkb_base 85

I'm running i3 version 4.18 (2020-02-17) on a MacBookPro10,2, where I removed the MacOS and installed Ubuntu 20.04.1 LTS/focal.

@ghost
Copy link

ghost commented Sep 6, 2020

UPDATE ON THE PREVIOUS COMMENT

It seems that the background isn't being rendered at all.

Here an example without moving to another workspace:

Use $mod+[0-9] to create a new workspace;
Use Shift+$mod+Space to enter into the float-mode.

image

It also behaves weirdly with the resize mode, and possible with the drag mode.
( @orestisfl Please, let me know if you need more data. Thanks! )

@orestisfl
Copy link
Member

@almir-campos this might be a different issue. Do you run a compositor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.17 bug missing-log Read the CONTRIBUTING.md file for instructions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants