[kwin] [Bug 369131] Closed application keeps its size when closed even if started on another screen

2016-10-16 Thread Thomas Lübking via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=369131

--- Comment #10 from Thomas Lübking  ---
If it's not partial, the window would be shrunk (for no reason)

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 369131] Closed application keeps its size when closed even if started on another screen

2016-10-15 Thread via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=369131

--- Comment #9 from db...@posteo.de ---
Yes, this helps as well. Basically the same thing as my patch (in this case).
But why not just replace keepInArea(fsa, partial_keep_in_area); with
keepInArea(area, partial_keep_in_area); instead ?

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 369131] Closed application keeps its size when closed even if started on another screen

2016-10-15 Thread Thomas Lübking via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=369131

--- Comment #8 from Thomas Lübking  ---
> 1366x768+1920+432
^
I suppose this to be the troublemaker.

The window asks to be bigger than your screen (no hackish attempt to be
maximized) and your screen geometry can support this, so you don't need/want to
shrink the window.

Try instead


diff --git a/manage.cpp b/manage.cpp
index 4198e60..3cbfb9e 100644
--- a/manage.cpp
+++ b/manage.cpp
@@ -433,14 +433,14 @@ bool Client::manage(xcb_window_t w, bool isMapped)
 // i intended a second check on cs < area.size() ("the managed
client ("minus border") is smaller
 // than the workspace") but gtk / gimp seems to store it's size
including the decoration,
 // thus a former maximized window wil become non-maximized
-bool keepInFsArea = false;
+bool keepInArea = false;
 if (width() < fsa.width() && (cs.width() > ss.width()+1)) {
 pseudo_max &= ~MaximizeHorizontal;
-keepInFsArea = true;
+keepInArea = true;
 }
 if (height() < fsa.height() && (cs.height() > ss.height()+1)) {
 pseudo_max &= ~MaximizeVertical;
-keepInFsArea = true;
+keepInArea = true;
 }

 if (pseudo_max != MaximizeRestore) {
@@ -457,8 +457,8 @@ bool Client::manage(xcb_window_t w, bool isMapped)
 geom_restore.setWidth(width());
 }
 }
-if (keepInFsArea)
-keepInArea(fsa, partial_keep_in_area);
+if (keepInArea)
+keepInArea(area, true);
 }
 }

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 369131] Closed application keeps its size when closed even if started on another screen

2016-10-14 Thread via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=369131

--- Comment #7 from db...@posteo.de ---
I attached the gdb output. So yes, I enter the branch pseudo_max &=
~MaximizeVertical;.

And yes, keepInArea is being called. But as I understand, this is not what
actually should be called.

fsa describes the full xrandr rectangle screen area. However,  if you have two
completely different screen sizes as in my case, there are lots of rectangle
areas, that are not visible.

What is the purpose of keepInArea(fsa,...) here? What are use cases when it
makes sense to span the window over the whole fsa?

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 369131] Closed application keeps its size when closed even if started on another screen

2016-10-14 Thread via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=369131

--- Comment #6 from db...@posteo.de ---
Created attachment 101568
  --> https://bugs.kde.org/attachment.cgi?id=101568=edit
gdb debug output

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 369131] Closed application keeps its size when closed even if started on another screen

2016-10-14 Thread via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=369131

--- Comment #5 from db...@posteo.de ---
Created attachment 101567
  --> https://bugs.kde.org/attachment.cgi?id=101567=edit
xrandr -q

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 369131] Closed application keeps its size when closed even if started on another screen

2016-10-13 Thread Thomas Lübking via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=369131

Thomas Lübking  changed:

   What|Removed |Added

 CC||thomas.luebk...@gmail.com

--- Comment #4 from Thomas Lübking  ---
What exactly happens on your side?
Do you enter the branch including "pseudo_max &= ~MaximizeVertical;"?
If yes, keepInArea should be called anyway. If not, the window should be
vertically maximized.

Also debug out area around
"if (height() >= area.height())
pseudo_max |=  MaximizeVertical;"

Could be the placement area is > the screenarea (because of borked struts)

And please dump "xrandr -q"

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 369131] Closed application keeps its size when closed even if started on another screen

2016-10-04 Thread Martin Gräßlin via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=369131

Martin Gräßlin  changed:

   What|Removed |Added

  Component|multihead   |core

--- Comment #3 from Martin Gräßlin  ---
yeah titlebar should never be outside the area. There is something fishy there.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 369131] Closed application keeps its size when closed even if started on another screen

2016-10-02 Thread via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=369131

--- Comment #2 from db...@posteo.de ---
Created attachment 101380
  --> https://bugs.kde.org/attachment.cgi?id=101380=edit
Patch

It is basically happening with every application, but might be depending on the
specific screen setup.

I have two monitors, where the height of monitor one is greater than height of
monitor 2. In addition monitor 2 has a vertical offset and is positioned right
of monitor 1. So the titlebar of an application with full height on monitor
will disappear on monitor 2 if the window is just shifted horizontally.

The patch resolves this issue for me. However, I don't fully understand the
purpose of the heuristic that is applied at that point, so it might screw thing
up.

-- 
You are receiving this mail because:
You are watching all bug changes.


[kwin] [Bug 369131] Closed application keeps its size when closed even if started on another screen

2016-09-21 Thread Thomas Lübking via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=369131

--- Comment #1 from Thomas Lübking  ---
Please specify "the application" for KDE applications should restore geometry
"per screen" anyway and the client may reconfigure itself to that position
after mapping (ie. there're several ways to end within this position and one
needs to know which in order to tackle it)

Relevant code is in manage.cpp and geometry.cpp

-- 
You are receiving this mail because:
You are watching all bug changes.