[Differential] [Commented On] D2164: Allow struts on panels between screen edges if WM is KWin

2016-07-20 Thread Sebastian Kügler
sebas added a comment.


  If @luebking is otherwise fine with it, why not merge it?

REPOSITORY
  rPLASMAWORKSPACE Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D2164

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: graesslin, #plasma
Cc: sebas, mart, luebking, plasma-devel, jensreuterberg, abetts
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[Differential] [Commented On] D2164: Allow struts on panels between screen edges if WM is KWin

2016-07-14 Thread Thomas Lübking
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
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[Differential] [Commented On] D2164: Allow struts on panels between screen edges if WM is KWin

2016-07-14 Thread mart (Marco Martin)
mart added a comment.


  fine with me.
  we are not "officially" supporting other window managers for libplasma anyways

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
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[Differential] [Commented On] D2164: Allow struts on panels between screen edges if WM is KWin

2016-07-14 Thread Thomas Lübking
luebking added inline comments.

INLINE COMMENTS

> graesslin wrote in panelview.cpp:857
> > also, how does this react when the WM is replaced?
> 
> tricky. I think it's a corner case which could be ignored. We don't really 
> have a way to detect it. I would say only "experienced" users know how to do 
> that, they should be prepared for impact.

One would require another signal in KWindowSystem - ultimately, it's only 
monitoring _NET_SUPPORTING_WM_CHECK on the root window

REPOSITORY
  rPLASMAWORKSPACE Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D2164

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: graesslin, #plasma
Cc: luebking, plasma-devel, jensreuterberg, abetts, sebas
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[Differential] [Commented On] D2164: Allow struts on panels between screen edges if WM is KWin

2016-07-14 Thread Martin Gräßlin
graesslin added inline comments.

INLINE COMMENTS

> luebking wrote in panelview.cpp:857
> qstricmp?
> also, how does this react when the WM is replaced?

> also, how does this react when the WM is replaced?

tricky. I think it's a corner case which could be ignored. We don't really have 
a way to detect it. I would say only "experienced" users know how to do that, 
they should be prepared for impact.

REPOSITORY
  rPLASMAWORKSPACE Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D2164

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: graesslin, #plasma
Cc: luebking, plasma-devel, jensreuterberg, abetts, sebas
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel