joelburget / slimlock

SLiM + slock = slimlock
GNU General Public License v2.0
40 stars 17 forks source link

Handle windows popping above the slimlock better. #14

Open aartamonau opened 12 years ago

aartamonau commented 12 years ago

Certain windows (especially notifications like notify-osd, etc) tend to make their windows "override redirect". Such windows can't be prevented from popping on top of slimlock. Previous approach of handling this was to raise our window every second. This is definitely better than nothing but potentially sensitive information is still revealed for some time. And actually it didn't work at least for me anyway: for some reason XRaiseWindow would not send Expose event. Probably it has something to do with the fact that this XRaiseWindow is send from another thread and Xlib is infamous for its multithreading support. So the new approach is to handle VisibilityNotify events and raise the window in case the event states that our window is partially or fully obscured. This is still not perfect since popping window will be seen as noticeable artifact. But it seems that x11 does not give a way to handle it better.

aartamonau commented 12 years ago

I just realized that it's not going to work with compositing enabled. So I should probably add a periodic call to XRaiseWindow as a fallback for such a case.

aartamonau commented 12 years ago

Added another commit to raise window in the old way. Which is needed as I said above when compositing is enabled.

wapiflapi commented 11 years ago

Hi,

I know this has been made over a year ago, but as it is still open I thought I'dd my two cents here.

@joelburget is no longer maintaining this project. Maybe it would be a good idea to submit this pull request to @dannyn /slimlock ?