Summary: | Maximize effect misbehaves when going from fullscreen to maximize | ||
---|---|---|---|
Product: | [Applications] gwenview | Reporter: | Mark <markg85> |
Component: | general | Assignee: | Gwenview Bugs <gwenview-bugs-null> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | kwin-bugs-null, myriam |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=336467 | ||
Latest Commit: | Version Fixed In: |
Description
Mark
2015-11-07 14:21:34 UTC
bug #336467 ? Try some other client (though this may even work with gwenview), resize small, maximize, then use the alt+f3 menu (titlebar context) to set the window fullscreen (more actions) - same behavior? You can also compare the outputs of "xprop _NET_WM_STATE" on either fullscreen window. Oke, tried that just now. The states with gwenview: Fullscreen: _NET_WM_STATE(ATOM) = _NET_WM_STATE_FULLSCREEN Maximized: _NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ MPV (it does not animate!): Fullscreen: _NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ, _NET_WM_STATE_FULLSCREEN Maximized: _NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ VLC (it does not animate) Fullscreen: _NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ, _NET_WM_STATE_FULLSCREEN Maximized: _NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ Does this mean that gwenview is missing the _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ attributes when in fullscreen mode and that's somehow preventing the animation to kick in? I tried "tricking" fullscreen by doing it via kwin on for instance dolphin, and it also gets 3 flags then: _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ, _NET_WM_STATE_FULLSCREEN and didn't animate. (In reply to Mark from comment #2) > Does this mean that gwenview is missing the _NET_WM_STATE_MAXIMIZED_VERT, > _NET_WM_STATE_MAXIMIZED_HORZ No, it means gwenview does not just go fullscreen, but unmaximizes and /then/ goes fullscreen (from the unmaximized state - for whatever reason) You see what you get *shrug*, the maximize effect could somehow cut animations when the window reaches the fullscreen state to cover this or something similar. However gwenview is rather not doing itself a favor by this behavior, since it includes an additional resize/repaint (and resizing GL contexts isn't cheap, notably slow on the nvidia blob) > I tried "tricking" fullscreen by doing it via kwin Fyi, that's not "tricking", kwin simply provides a general way for every client to set the _NET_WM_STATE_FULLSCREEN flag. (In reply to Thomas Lübking from comment #3) > (In reply to Mark from comment #2) > > > Does this mean that gwenview is missing the _NET_WM_STATE_MAXIMIZED_VERT, > > _NET_WM_STATE_MAXIMIZED_HORZ > > No, it means gwenview does not just go fullscreen, but unmaximizes and > /then/ goes fullscreen (from the unmaximized state - for whatever reason) > You see what you get *shrug*, the maximize effect could somehow cut > animations when the window reaches the fullscreen state to cover this or > something similar. > > However gwenview is rather not doing itself a favor by this behavior, since > it includes an additional resize/repaint (and resizing GL contexts isn't > cheap, notably slow on the nvidia blob) > > > I tried "tricking" fullscreen by doing it via kwin > Fyi, that's not "tricking", kwin simply provides a general way for every > client to set the _NET_WM_STATE_FULLSCREEN flag. And you already changed it to gwenview. Thank you for the quick help and diagnostics :) Completely untested patch (no gwenview installed and smplayer doesn't start because that stupid SNI thing hangs forever, boosts the CPU and blocks the eventqueue - for a stupid systray nonsense.... *sigh*) diff --git a/effects/maximize/package/contents/code/maximize.js b/effects/maximize/package/contents/code/maximize.js index 3077ad4..556bd11 100644 --- a/effects/maximize/package/contents/code/maximize.js +++ b/effects/maximize/package/contents/code/maximize.js @@ -35,7 +35,7 @@ var maximizeEffect = { oldGeometry = window.olderGeometry; window.olderGeometry = window.oldGeometry; window.oldGeometry = newGeometry; - animate({ + window.maximizeEffectA1 = animate({ window: window, duration: maximizeEffect.duration, animations: [{ @@ -61,7 +61,7 @@ var maximizeEffect = { }] }); if (!window.resize) { - animate({ + window.maximizeEffectA2 = animate({ window: window, duration: maximizeEffect.duration, animations: [{ @@ -74,6 +74,10 @@ var maximizeEffect = { }, geometryChange: function (window, oldGeometry) { "use strict"; + cancel(window.maximizeEffectA1); + delete window.maximizeEffectA1; + cancel(window.maximizeEffectA2); + delete window.maximizeEffectA2; window.oldGeometry = window.geometry; window.olderGeometry = oldGeometry; }, (In reply to Thomas Lübking from comment #5) > Completely untested patch (no gwenview installed and smplayer doesn't start > because that stupid SNI thing hangs forever, boosts the CPU and blocks the > eventqueue - for a stupid systray nonsense.... *sigh*) > > > diff --git a/effects/maximize/package/contents/code/maximize.js > b/effects/maximize/package/contents/code/maximize.js > index 3077ad4..556bd11 100644 > --- a/effects/maximize/package/contents/code/maximize.js > +++ b/effects/maximize/package/contents/code/maximize.js > @@ -35,7 +35,7 @@ var maximizeEffect = { > oldGeometry = window.olderGeometry; > window.olderGeometry = window.oldGeometry; > window.oldGeometry = newGeometry; > - animate({ > + window.maximizeEffectA1 = animate({ > window: window, > duration: maximizeEffect.duration, > animations: [{ > @@ -61,7 +61,7 @@ var maximizeEffect = { > }] > }); > if (!window.resize) { > - animate({ > + window.maximizeEffectA2 = animate({ > window: window, > duration: maximizeEffect.duration, > animations: [{ > @@ -74,6 +74,10 @@ var maximizeEffect = { > }, > geometryChange: function (window, oldGeometry) { > "use strict"; > + cancel(window.maximizeEffectA1); > + delete window.maximizeEffectA1; > + cancel(window.maximizeEffectA2); > + delete window.maximizeEffectA2; > window.oldGeometry = window.geometry; > window.olderGeometry = oldGeometry; > }, Nope, doesn't work. No more resize animation at all after i apply that, yes the plugin is on. Indeed - and now i know what "strict" implies =) diff --git a/effects/maximize/package/contents/code/maximize.js b/effects/maximize/package/contents/code/maximize.js index 3077ad4..d381a68 100644 --- a/effects/maximize/package/contents/code/maximize.js +++ b/effects/maximize/package/contents/code/maximize.js @@ -35,7 +35,7 @@ var maximizeEffect = { oldGeometry = window.olderGeometry; window.olderGeometry = window.oldGeometry; window.oldGeometry = newGeometry; - animate({ + window.maximizeAnimation1 = animate({ window: window, duration: maximizeEffect.duration, animations: [{ @@ -61,7 +61,7 @@ var maximizeEffect = { }] }); if (!window.resize) { - animate({ + window.maximizeAnimation2 =animate({ window: window, duration: maximizeEffect.duration, animations: [{ @@ -74,6 +74,17 @@ var maximizeEffect = { }, geometryChange: function (window, oldGeometry) { "use strict"; + if (window.maximizeAnimation1) { + if (window.geometry.width != window.oldGeometry.width || + window.geometry.height != window.oldGeometry.height) { + cancel(window.maximizeAnimation1); + delete window.maximizeAnimation1; + if (window.maximizeAnimation2) { + cancel(window.maximizeAnimation2); + delete window.maximizeAnimation2; + } + } + } window.oldGeometry = window.geometry; window.olderGeometry = oldGeometry; }, Dupe downstream bug says this is QWidget::showFullscreen, so the clients aren't gonna fix it. *** This bug has been marked as a duplicate of bug 336467 *** |