[Differential] [Commented On] D2164: Allow struts on panels between screen edges if WM is KWin
luebking (Thomas Lübking)
noreply at phabricator.kde.org
Thu Jul 14 16:32:05 UTC 2016
luebking added a comment.
In https://phabricator.kde.org/D2164#40170, @graesslin wrote:
> - fixed logic error with platform check
See? ;-)
Looks good otherwise.
INLINE COMMENTS
> panelview.cpp:926
>
> - //Extended struts against a screen edge near to another screen are really harmful, so windows maximized under the panel is a lesser pain
> - //TODO: force "windows can cover" in those cases?
> - const int numScreens = corona()->numScreens();
> - for (int i = 0; i < numScreens; ++i) {
> - if (i == containment()->screen()) {
> - continue;
> - }
> -
> - const QRect otherScreen = corona()->screenGeometry(i);
> - if (!otherScreen.isValid()) {
> - continue;
> - }
> -
> - switch (location())
> - {
> - case Plasma::Types::TopEdge:
> - if (otherScreen.bottom() <= thisScreen.top()) {
> - KWindowSystem::setExtendedStrut(winId(), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
> - return;
> - }
> - break;
> - case Plasma::Types::BottomEdge:
> - if (otherScreen.top() >= thisScreen.bottom()) {
> - KWindowSystem::setExtendedStrut(winId(), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
> - return;
> - }
> - break;
> - case Plasma::Types::RightEdge:
> - if (otherScreen.left() >= thisScreen.right()) {
> - KWindowSystem::setExtendedStrut(winId(), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
> - return;
> - }
> - break;
> - case Plasma::Types::LeftEdge:
> - if (otherScreen.right() <= thisScreen.left()) {
> - KWindowSystem::setExtendedStrut(winId(), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
> - return;
> - }
> - break;
> - default:
> - return;
> - }
> + if (!canSetStrut()) {
> + KWindowSystem::setExtendedStrut(winId(), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this could go up (spare crashy virtualSize() calls ;-)
REPOSITORY
rPLASMAWORKSPACE Plasma Workspace
REVISION DETAIL
https://phabricator.kde.org/D2164
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: graesslin, #plasma
Cc: mart, luebking, plasma-devel, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160714/c64696eb/attachment.html>
More information about the Plasma-devel
mailing list