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

Fix desktop redraws in GTK 3.21.3 and later #1232

Closed

Conversation

lukefromdc
Copy link
Contributor

@lukefromdc lukefromdc commented Jul 22, 2016

GTK 3.21.3 and later broke desktop redrawing except in Nautilus. The commit that made the difference between it working and not working was traced to
GNOME/nautilus@6d6bf1e
canvas-container: don't force native window for the desktop canvas
shortly before Nautilus 3.7.21 came out. To make this work on Nemo also required forcing the scrolledwindow of nemo-desktop-icon-view transparent with a cssprovider, as otherwise it would put a white background on the desktop. Works, running it right now as I post this.

Fixes #1231

GNOME/nautilus@6d6bf1e
This fixes the failure of GTK 3.21.3 or later to redraw the desktop background properly when the foreground is redrawn, but turns the desktop white. Next commit fixes the white desktop caused by the scrolledwindow turning white
Force the scrolledwindow (nemo-desktop-icon-view) to stay transparent after previous commit for desktop redrawing in GTK 3.21.3 or later
@itzexor
Copy link
Contributor

itzexor commented Jul 22, 2016

Tagging mate-desktop/caja#575 and #1231 so that those people can test this if they want.

Edit: If you include "Fixes #1231" in your PR note, it should close that issue once it's merged.

comment was leftover from code the cssprovider was originally used on and not relevent to its reuse in Nemo
@mtwebster
Copy link
Member

Hi,

Can you try putting the css in this file: https://github.com/linuxmint/nemo/blob/master/src/nemo-style-application.css - it gets loaded during nemo startup, and would be cleaner than how it is here.

I'll try to test this weekend as well. Thanks

@lukefromdc
Copy link
Contributor Author

I just tried that, it only worked in Adwaita because all other themes I have override
the css file and put their background on the desktop. With the cssprovider themes
are overridden.

On 7/22/2016 at 12:03 AM, "Michael Webster" notifications@github.com wrote:

Hi,

Can you try putting the css in this file:
https://github.com/linuxmint/nemo/blob/master/src/nemo-style-
application.css - it gets loaded during nemo startup, and would be
cleaner than how it is here.

I'll try to test this weekend as well. Thanks


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#1232 (comment)

@leigh123linux
Copy link
Contributor

leigh123linux commented Jul 22, 2016

@lukefromdc

this works for some themes, the patch still needs some work

@lukefromdc
Copy link
Contributor Author

You found a problem the GNOME developers had a lot of trouble with in later Nautilus work: both the notebook and both paned widgets pick up default background colors in many but not all themes. Only my own theme and Adwaita work either with my original PR or with your patch version(which also works). The offending widgets are both paned widgets and the notebook. The notebook can be turned transparent in nemo-style-application.css but both paned widgets get it overridden by the theme and show the theme background color. I could fix that but would be using gtk_widget_set_name or adding a style class to them. A quick test with the set_css_name code gave a build failure after I used it wrong in some way.

@lukefromdc
Copy link
Contributor Author

I'll try this later today (Monday) I was out of town all day today

On 7/23/2016 at 8:05 AM, "leigh123linux" notifications@github.com wrote:

I've altered the css in the patch to try and address the themes
issues, I've tested with mate-themes and arc themes and they seem
to work.

[canvas-
container.patch.txt](https://github.com/linuxmint/nemo/files/379531
/canvas-container.patch.txt)


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#1232 (comment)

@lukefromdc
Copy link
Contributor Author

I just tested your latest patch, all the MATE themes still drew their background colors on the desktop. Adwaita, Raleigh, and my own UbuntuStudio_Legacy theme all worked. Troublesome widgets were the notebook and paned widgets. Editing the css file got it to work in every theme I have, though I found out the hard way that I had to run "make clean" between every test or the gresource based on this file would not be regenerated (ugh). The patch below resulted:

--- /home/luke/Desktop/nemo-style-application.css   2016-07-26 00:16:35.497198233 -0400
+++ /home/luke/Desktop/nemo-style-application.css_FIXED 2016-07-26 00:54:24.208289398 -0400
@@ -1,7 +1,10 @@
 /* Desktop text stuff */

 .nemo-desktop-icon-view,
-.nemo-desktop-icon-view .view {
+.nemo-desktop-icon-view .view,
+.nemo-window-pane,
+.nemo-desktop-window paned,
+.nemo-desktop-window notebook{
     background-color: transparent;
 }

@lukefromdc
Copy link
Contributor Author

Closing in favor of #1235 which uses a better approach to the same job and is what I now use myself

@lukefromdc lukefromdc closed this Aug 31, 2016
@lukefromdc
Copy link
Contributor Author

Closing in favor of #1235 which uses a better approach to the same job and is what I now use myself

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

Successfully merging this pull request may close these issues.

4 participants