Changeset View
Changeset View
Standalone View
Standalone View
toplevel.cpp
Show First 20 Lines • Show All 330 Lines • ▼ Show 20 Line(s) | |||||
331 | } | 331 | } | ||
332 | 332 | | |||
333 | void Toplevel::getShadow() | 333 | void Toplevel::getShadow() | ||
334 | { | 334 | { | ||
335 | QRect dirtyRect; // old & new shadow region | 335 | QRect dirtyRect; // old & new shadow region | ||
336 | const QRect oldVisibleRect = visibleRect(); | 336 | const QRect oldVisibleRect = visibleRect(); | ||
337 | if (hasShadow()) { | 337 | if (hasShadow()) { | ||
338 | dirtyRect = shadow()->shadowRegion().boundingRect(); | 338 | dirtyRect = shadow()->shadowRegion().boundingRect(); | ||
339 | effectWindow()->sceneWindow()->shadow()->updateShadow(); | 339 | if (!effectWindow()->sceneWindow()->shadow()->updateShadow()) { | ||
340 | effectWindow()->sceneWindow()->updateShadow(nullptr); | ||||
341 | } | ||||
342 | emit shadowChanged(); | ||||
340 | } else { | 343 | } else { | ||
341 | Shadow::createShadow(this); | 344 | Shadow::createShadow(this); | ||
342 | } | 345 | } | ||
343 | if (hasShadow()) | 346 | if (hasShadow()) | ||
344 | dirtyRect |= shadow()->shadowRegion().boundingRect(); | 347 | dirtyRect |= shadow()->shadowRegion().boundingRect(); | ||
345 | if (oldVisibleRect != visibleRect()) | 348 | if (oldVisibleRect != visibleRect()) | ||
346 | emit paddingChanged(this, oldVisibleRect); | 349 | emit paddingChanged(this, oldVisibleRect); | ||
347 | if (dirtyRect.isValid()) { | 350 | if (dirtyRect.isValid()) { | ||
▲ Show 20 Lines • Show All 212 Lines • Show Last 20 Lines |