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

Background blur and spaces #47

Closed
galli-a opened this issue Sep 9, 2014 · 29 comments
Closed

Background blur and spaces #47

galli-a opened this issue Sep 9, 2014 · 29 comments

Comments

@galli-a
Copy link

galli-a commented Sep 9, 2014

I managed to implement the background blur on my widgets, and it looks great. I still have to fidget with size and position, as the blurred picture looks wider than the real background, but that's another issue.
When I tried to switch spaces, that have different background pictures, the blurred canvas retains whatever picture was displayed when the last refresh occurred. Examples in the included pictures.
schermata 2014-09-09 alle 18 06 54
schermata 2014-09-09 alle 18 07 03

@felixhageloh
Copy link
Owner

I see ... can you show the code your are using? Both, the positioning and updating the background when changing workspaces should work fine. Also check the debug console for errors, which might give some extra clues

@galli-a
Copy link
Author

galli-a commented Sep 10, 2014

I use a widget to just the the background blur, with no content. It relies heavily on your example. The full code is:

command: ""

refreshFrequency: 10000

style: """
  z-index: -2
  bottom: 0px
  left: 50%
  width: 1440px
  height: 210px
  margin-left: -(@width / 2)
  overflow: hidden
  background: rgba(#333, 0.2)

  .content
    border-radius: 9px
    background: rgba(#333, 0.0)
    color: #152033

  bg-blur = 5px

  .bg-slice
    position: absolute
    top: -(bg-blur)
    left: 0
    width: 100% 
    height: 100% + 2*bg-blur
    -webkit-filter: blur(bg-blur)

"""

render: (output) -> """
  <canvas class='bg-slice'></canvas>
  <div class='content'>#{output}</div>
"""

afterRender: (domEl) ->
  uebersicht.makeBgSlice(el) for el in $(domEl).find '.bg-slice'

The position was off because I had put in the wrong number for the width, 1540 instead of 1440...
In the debug console I don't get any error, as can be seen in the attached picture.

schermata 2014-09-10 alle 16 49 02

@felixhageloh
Copy link
Owner

ok, thanks for the info. One other question: Are you on 0.3 (update was released yesterday) already?

@galli-a
Copy link
Author

galli-a commented Sep 10, 2014

Yes, but I saw the same behavior on the 0.2 edge version you provided for issue #42

@felixhageloh
Copy link
Owner

I see - hard to tell what is going on. Does it update when you change the wallpaper?
Also can you open the system console (Console app) and search for 'sicht' and post a screenshot here? Thanks!

@felixhageloh
Copy link
Owner

your setup looks nice btw!

@galli-a
Copy link
Author

galli-a commented Sep 10, 2014

I have the wallpaper set to change every 15 minutes, and the blurred widgets updates itself in one or, at most, two seconds.
The system console logs are:

schermata 2014-09-10 alle 17 08 50

where the only error I can see is

10/09/14 17:08:27,379 gkbisd[586]: Unable to collect cdhash for /Applications/Übersicht.app (error code 100024)

One other data point is that sometimes, rarely, I see "ghosting" from the previous blurred pictures into the new one. It's hard to describe, but the next time it happens I'll be sure to capture it. If I tell Übersicht to "Refresh All Widgets", it immediately goes away.

And, thanks for the compliment!

@felixhageloh
Copy link
Owner

The error you are getting seems to be this https://discussions.apple.com/thread/6433525, but I doubt it is related.
I tried your setup (wallpaper changing every 15min and different workspaces) but it wall seems to work fine here. So to find out what might be going on I made a build of Übersicht here with extra debugging information. So maybe you can run that one, switch workspaces a few times and a post the output of the Console app again? You should see messages, like "workspace changed"

@galli-a
Copy link
Author

galli-a commented Sep 10, 2014

Tried that, the console output doesn't show any additional information other than the "workspace changed" ones:

schermata 2014-09-10 alle 17 38 33

@felixhageloh
Copy link
Owner

no worries it already gives me an idea what might be going on :)

@galli-a
Copy link
Author

galli-a commented Sep 10, 2014

Ok. I also had the other issue with the ghosting.

schermata 2014-09-10 alle 17 45 27

As you can see, the blurred image follows the shape of the background picture (see the space between the trees in the center), but has a definite orange tint, and you can also see the shapes that were present in the previous picture, for example immediately to the left of the calendar. And those are not in the current picture...

Should I open a new issue for that, or is it OK to continue posting here?

@felixhageloh
Copy link
Owner

strange! Its ok, no need to start a new issue for that.

So i've updated the link with a new build. You can try that and see if it fixes the issue of switching workspaces

@galli-a
Copy link
Author

galli-a commented Sep 10, 2014

The new build solves the spaces issue.
In my limited testing so far, I couldn't see the ghosting issue either.
If it ever presents itself again, I'll reopen the issue with further details.

@galli-a galli-a closed this as completed Sep 10, 2014
@galli-a
Copy link
Author

galli-a commented Sep 11, 2014

Ok, it happened again. So maybe it's not so rare after all...

schermata 2014-09-11 alle 18 26 27

The current picture has an almost uniform blue background, whereas the previous one had light and dark stripes as can be seen immediately on the left of the calendar. I don't see any error either in the debug console or in the system console.

Is there any additional test I can make to help in debugging this?

@galli-a galli-a reopened this Sep 11, 2014
@felixhageloh
Copy link
Owner

Hmm, it almost looks like a bug with the canvas element. I'll try to clear the canvas before rendering a new wallpaper slice and see if that helps. I'll be quite busy today, but I might have a new build for you this weekend!

@felixhageloh
Copy link
Owner

You can use the previous link to download a new build. I am now explicitly clearing the canvas every time, which will make it a bit more resource intensive but maybe it fixes this issue!

@galli-a
Copy link
Author

galli-a commented Sep 13, 2014

With the latex build I can't see any blur. Obviously the widget is the same as before.
The debug console shows an error:

TypeError: 'undefined' is not a function (evaluating 'canvas.clearRect(0, 0, canvas.width, canvas.height)')

schermata 2014-09-13 alle 12 57 44

@felixhageloh
Copy link
Owner

my bad, should have tested it before :). Fixed and updated the build

@galli-a
Copy link
Author

galli-a commented Sep 13, 2014

Nope, sorry. Same behavior. I think the build is the old one, since on the Dropbox page it says "2 h ago".
For the record, the version in the About window is Version 0.3 (10).

@felixhageloh
Copy link
Owner

sorry try again ... dropbox wasn't done syncing when I closed my laptop

@galli-a
Copy link
Author

galli-a commented Sep 13, 2014

Seems to be solved now. I haven't seen any issue, even when setting the desktop picture to change every minute (I usually have it change every 15 minutes, it was just to speed up the testing).

@galli-a galli-a closed this as completed Sep 13, 2014
@galli-a
Copy link
Author

galli-a commented Sep 13, 2014

Sorry, I spoke too soon. I still see the ghosting effect. Still no error in the debug console.

schermata 2014-09-13 alle 15 00 11

@galli-a galli-a reopened this Sep 13, 2014
@felixhageloh
Copy link
Owner

sorry for the late response - I will see if I can reproduce this and probably file a bug with apple!

@felixhageloh
Copy link
Owner

In case you updated to Yosemite, can you check if this still happens there?

@galli-a
Copy link
Author

galli-a commented Oct 19, 2014

Sorry, not updated yet. I plan to do it during next week. As soon as I do, I'll notify you about they issue.

@galli-a
Copy link
Author

galli-a commented Oct 27, 2014

Updated to Yosemite and the latest version of Übersicht, but still seeing the issue.
I see a lot of errors of the type:

Failed to load resource: the server responded with a status of 500 (Internal Server Error)  http://127.0.0.1:41416/widgets/cpu-widget-index-coffee    
cpu-widget-index-coffee: sar: drivepath sync code error -4
redraw main.js:473
(anonymous function) main.js:518
j jquery.js:2:26946
fireWith jquery.js:2:27755
x jquery.js:4:10548
(anonymous function) jquery.js:4:14161

Not sure those are relevant, though. After relaunching Übersicht, no more error are present, but the issue is still present intermittently.

@felixhageloh
Copy link
Owner

Thanks for the update. Is one of your widgets using the sar command, because it looks like that's where the error is coming from.

I am still not sure about the glitch with the wallpapers. Is the element you are rendering the wallpaper in very transparent? In that case it could be that it is just showing the previous wallpaper instead of the current one

@galli-a
Copy link
Author

galli-a commented Oct 27, 2014

I am in fact using sar to get the cpu load, but the relevant widget still seems to work ok, even with the error, that shows up again after a while.

As for the wallpapers, I use an alpha of 0.2, so you may be on to something. The widget code is the same I already posted on September the 10th, if you need to check it. However, I actually see the current wallpaper as blurred, not the previous one.

@galli-a
Copy link
Author

galli-a commented Dec 29, 2015

Did a clean install of El Capitan, and the issue does not appear anymore.

@galli-a galli-a closed this as completed Dec 29, 2015
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