1 qt-bugs@ issue : N45716
3 author: Enrico Ros <eros.kde@email.it>
5 QScrollView unwanted repaint fix.
7 This fixes the 'flashing' konqueror window on activation / deactivation by
8 saving 1 unwanted repaint (when konqueror window has background).
9 I tracked down to the problem to the internal QViewportWidget of the
12 When a window is activated the activation event is recursively propagated
13 to all childs triggering the windowActivationChange() functions in the
15 What happens when the event gets to the Viewport?
16 At this point the event has already been handled by windowActivationChange()
17 of the parent widget (a QIconView for example) and has then been propagated
18 to the Viewport that will handle it with the default
19 QWidget::windowActivationChange implementation, maybe raising an unwanted
20 update(); so here we stop the event.
21 As an addition: if the parent reimplements the windowActivationChange()
22 function, mainly to block the update, it won't be happy if the child will
23 trigger the update. If the parent do not reimplement the function il will
24 inherits the default implementation and there is no need for the viewport's
27 --- src/widgets/qscrollview.cpp.orig 2004-03-29 10:17:04.000000000 +0000
28 +++ src/widgets/qscrollview.cpp 2004-03-30 16:40:07.599978320 +0000
30 case QEvent::LayoutHint:
31 d->autoResizeHint(this);
33 + case QEvent::WindowActivate:
34 + case QEvent::WindowDeactivate: