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

MATE does not update wallpaper during monitor events when show-desktop-icons is set to false #335

Open
nikp123 opened this issue Aug 19, 2020 · 6 comments

Comments

@nikp123
Copy link

nikp123 commented Aug 19, 2020

Expected behaviour

With the icons disabled (dconf), I expect that the wallpaper updates upon change in display configuration. Basically just redrawing the background of the root window (in case of X11) when an RRScreenChangeNotify event is recieved.

Actual behaviour

The wallpaper does not update when plugging in a video output or when I change the monitor settings through the Control Center.

Steps to reproduce the behaviour

  1. Set a wallpaper using said Control Center
  2. Disable desktop icons in dconf
  3. Plug/unplug video source or reconfigure existing displays

MATE general version

1.24.0

Package version

1.24.0-1 (Arch default repository)

Linux Distribution

ArchLinux

Link to downstream report of your Distribution

None

Notes

I've already created an issue, just on a different component of MATE (that I thought was the culprit) and got redirected here.
Link to said issue: mate-desktop/mate-panel#1136
Also as I've mentioned in the previous post, this is not a default setup and involves using different desktop components (such as i3wm, a different compositor and so on)

@nikp123
Copy link
Author

nikp123 commented Sep 26, 2020

@thomashuss
Copy link

thomashuss commented Apr 30, 2024

I'm still experiencing this on 1.26.0 on Debian 12. (I had also experienced on Arch for quite some time and never reported.) I wrote a simple C program to verify that the GTK monitors-changed event is emitted (it is). Running with mate-settings-daemon --replace --debug did not print the debug statement for screen size changed/unchanged. I'm not sure how to debug this further.

@lukefromdc
Copy link
Member

lukefromdc commented Apr 30, 2024 via email

@nikp123
Copy link
Author

nikp123 commented May 1, 2024

This implies some code for updating the wallpaper in Caja never made it into mate-settings-daemon, from
which the background is managed when Caja is not showing icons

Apologies for non-clarification, it in fact happens without Caja running in desktop mode (ie. as a bottom layer window).

This setup assumes that we're running a desktop which doesn't have a "desktop" window. Just a pure X11 root window background. I assumed it was a supported use case since the daemon does indeed update the X11 root window, just not when any monitor events happen.

PS: Or at least that's what I remember, because I haven't used this setup for at least 3 years now, sorry ;)

@thomashuss
Copy link

thomashuss commented May 1, 2024

Let me preface this by saying I am not familiar with GTK so I don't know if I'm testing this right. Nonetheless, I wrote this test program which prints the resolution and listens for monitor changes in the same way as MSD. The correct resolution is sometimes printed after changing monitor settings in Displays or after (dis)connecting a monitor. However, the background is only reliably updated when the monitor settings are changed. Example output with just connecting and disconnecting monitors:

$ ./gtk_monitors_test
1920x1080  <-- disconnected 1920x1080 monitor => switch to 1920x1200 internal display
1920x1080
1920x1200
1920x1200  <-- connected 1920x1080 monitor => disable 1920x1200 internal display

I noticed that Caja's monitor change callback does not obtain screen size using the GdkScreen pointer passed to the callback function, instead obtains size of the screen belonging to what is apparently the desktop background window. Therefore I added the --window option to the test program, but creating the window yields the same result so I am not sure why it works in Caja but not here.

@lukefromdc
Copy link
Member

lukefromdc commented May 8, 2024

Note that the GdkScreen is (I believe since GTK 3.10) a superset of all monitors and is basically the smallest rectangle that can be drawn around all of the monitors in a multimonitor setiup.

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

3 participants