Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Notifications do not repaint under certain conditions #536

jleclanche opened this Issue Jan 19, 2013 · 8 comments


None yet
3 participants

jleclanche commented Jan 19, 2013

Might be related to issue #383. This took me a while to track down...

If an app sends a notification twice in a row, the second notification is not properly painted (and looks like the background, so becomes invisible). This ONLY happens if the notification is configured to be at the top of the screen, not at the bottom.

This is easily tested: Open the notification configuration module, set them to the topleft or topright. Press test, close the notification. Press test again and move whatever window would be behind the notification.


pvanek commented Feb 13, 2013

confirmed. But I have no clue what can be wrong...


PCMan commented Nov 6, 2013

I just did some simple tests and I really think that it's a bug in Qt itself.
When you remove Qt::X11BypassWindowManagerHint and Qt::FramelessWindowHint flags from NotificationArea, repainting works. If these two flags are set, Qt does not trigger paintEvent() at all when the second time a notification is shown.
Please note that paintEvent() is not called at all. So Qt does not know that the widget needs to be repainted. I believe that It's a Qt bug. If possible, a simple test case is needed to proove that.
For now, there is a workaround which works, but it's very inefficient.
Adding repaint() at the end of NotificationLayout::addNotification() to force repainting can workaraound this bug temporarily.


pvanek commented Nov 6, 2013

it makes sense. On the other side it's quite strange to happens only in the top-left/right corners of the screen.


PCMan commented Nov 6, 2013

Another workaround is also simple, just delete the notification window when there are no more notifications.
Then, recreate a new one next time when we need to show some notifications.
That is, do not reuse the NotificationLayout widget. It makes sense since this also saves some memory and system resourcs when we don't need to show notificaitons.


PCMan commented Nov 6, 2013

BTW, disabling double buffer of the widget also result in correct repainting.
It seems to be a bug of Qt painting back store/double buffering stuff.

@PCMan PCMan added a commit to lxde/lxqt-notificationd that referenced this issue Nov 7, 2013

@PCMan PCMan Add a dirty hack to workaround repainting issues and fix razor-qt bug…
… 536.

See Razor-qt/razor-qt#536 for details.

PCMan commented Nov 7, 2013

I did a dirty hack to workaround this in lxqt-notificationd.
Please see: lxde/lxqt-notificationd@c472efc
Hope this helps.


jleclanche commented Nov 28, 2013

Has this been filed upstream in Qt?


jleclanche commented May 15, 2014

Closing this as it's fixed in lxqt.

@jleclanche jleclanche closed this May 15, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment