OK, then I guess you could put an IF _fromTray, or something in it?
I'm not a coder, so...
Maybe it should be put (back) in mantis then?
/// Handles the OnSizeChanged event, which isn't the same as the resize event.
/// </summary>
/// <param name="e">Event arguments</param>
protected override void OnSizeChanged(EventArgs e)
{
if (_fromTray == false)
{
if (GUIGraphicsContext.IsDirectX9ExUsed() && this.Visible && !_resizeOngoing && !_toggleFullWindowed &&
!_ignoreNextResizeEvent && this.WindowState == _windowState)
{
Log.Info("Main: OnSizeChanged - Resetting device");
[COLOR="DarkRed"]GUITextureManager.CleanupThumbs(); //swede
GUITextureManager.Dispose();//swede
GUIFontManager.Dispose();//swede
Log.Info("swede: Onsizechanged");[/COLOR]
SwitchFullScreenOrWindowed(false);
OnDeviceReset(null, null);
}
}
base.OnSizeChanged(e);
}
/// <summary>
/// Handle OnResizeBegin
/// </summary>
protected override void OnResizeBegin(EventArgs e)
{
if (GUIGraphicsContext.IsDirectX9ExUsed())
{
_resizeOngoing = true;
_clientSize = ClientSize;
[COLOR="darkred"] GUITextureManager.CleanupThumbs(); //swede
GUITextureManager.Dispose();//swede
GUIFontManager.Dispose();//swede
Log.Info("swede: OnResizebegin");[/COLOR]
protected override void OnDeviceReset(Object sender, EventArgs e)
{
Log.Info("Main: Resetting DX9 device");
GUITextureManager.Dispose(); // <--- added
GUIFontManager.Dispose(); // <--- added
Please test following change. Add two lines in MediaPortal.cs:
Code:protected override void OnDeviceReset(Object sender, EventArgs e) { Log.Info("Main: Resetting DX9 device"); GUITextureManager.Dispose(); // <--- added GUIFontManager.Dispose(); // <--- added
protected override void OnSizeChanged(EventArgs e)
{
if (_fromTray == false) // <--- added