Changeset View
Changeset View
Standalone View
Standalone View
stage/part/KPrAnimationDirector.cpp
Show First 20 Lines • Show All 130 Lines • ▼ Show 20 Line(s) | 111 | { | |||
---|---|---|---|---|---|
131 | } | 131 | } | ||
132 | } | 132 | } | ||
133 | else { | 133 | else { | ||
134 | QRect clipRect = m_pageRect.intersected( paintRect.toRect() ); | 134 | QRect clipRect = m_pageRect.intersected( paintRect.toRect() ); | ||
135 | painter.setClipRect( clipRect ); | 135 | painter.setClipRect( clipRect ); | ||
136 | painter.setRenderHint( QPainter::Antialiasing ); | 136 | painter.setRenderHint( QPainter::Antialiasing ); | ||
137 | paintStep( painter ); | 137 | paintStep( painter ); | ||
138 | } | 138 | } | ||
139 | // This is needed as otherwise on some ATI graphic cards it leads to | | |||
140 | // 100% CPU load of the x server and no more key events are received | | |||
141 | // until the page effect is finished. With it is made sure that key | | |||
142 | // events still get through so that it is possible to cancel the | | |||
143 | // events. It looks like this is not a problem with nvidia graphic | | |||
144 | // cards. | | |||
145 | qApp->syncX(); | | |||
146 | } | 139 | } | ||
147 | 140 | | |||
148 | void KPrAnimationDirector::paintEvent( QPaintEvent* event ) | 141 | void KPrAnimationDirector::paintEvent( QPaintEvent* event ) | ||
149 | { | 142 | { | ||
150 | QPainter painter( m_canvas ); | 143 | QPainter painter( m_canvas ); | ||
151 | paint(painter, event->rect()); | 144 | paint(painter, event->rect()); | ||
152 | } | 145 | } | ||
153 | 146 | | |||
▲ Show 20 Lines • Show All 364 Lines • Show Last 20 Lines |