Kaydet (Commit) e6a19560 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

tdf#91301: Don't cache incomplete tabs.

After introduction of the Idle processing, something has changed so
that the underlying GetGdkWindow() does not update its size fast enough;
even though the gtk_window_resize() is called before the Window::Erase()
(that actually paints the background) etc.

The consequence of the not-yet-updated gdkDrawable is that we cache
something that has the correct background in the top left 200x200
pixels, but the rest is just copied from the screen.

Let's for now just not cache when the GetGdkWindow() is smaller than
what we actually paint; TODO find the root cause.

Change-Id: Ib6092668eb4613899f665bb0f12fc1eb15484e13
üst fbfee1dd
...@@ -2914,11 +2914,31 @@ bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart, ...@@ -2914,11 +2914,31 @@ bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
} }
END_CACHE_PIXMAP_RENDER( pixmapRect, pixmap, mask ) END_CACHE_PIXMAP_RENDER( pixmapRect, pixmap, mask )
// tdf#91301 workaround
//
// After introduction of the Idle processing, something has changed so
// that the underlying GetGdkWindow() does not update its size fast enough;
// even though the gtk_window_resize is called before the Window::Erase()
// (that actually paints the background) etc.
//
// The consequence of the not-yet-updated gdkDrawable is that we cache
// something that has the correct background in the top left 200x200
// pixels, but the rest is just copied from the screen.
//
// Let's for now just not cache when the GetGdkWindow() is smaller than
// what we actually paint; TODO find the root cause.
gint width, height;
gdk_drawable_get_size(GetGdkWindow(), &width, &height);
bool bAllowCaching = (pixmapRect.Right() < width) && (pixmapRect.Bottom() < height);
// cache data // cache data
if( nType == CTRL_TAB_ITEM ) if (bAllowCaching)
aCacheItems.Fill( nType, nState, pixmapRect, pixmap, mask ); {
else if (nType == CTRL_TAB_ITEM)
aCachePage.Fill( nType, nState, pixmapRect, pixmap, mask ); aCacheItems.Fill(nType, nState, pixmapRect, pixmap, mask);
else
aCachePage.Fill(nType, nState, pixmapRect, pixmap, mask);
}
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment