Bug 70160 - docked windows shrink up to zero size on resize
Summary: docked windows shrink up to zero size on resize
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: Other All
: high normal
Assignee: Prashant
URL:
Whiteboard: target:4.2.0
Keywords: regression
Depends on:
Blocks: mab4.2 74519
  Show dependency treegraph
 
Reported: 2013-10-05 06:12 UTC by Ivan Timofeev (retired)
Modified: 2014-02-04 17:18 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Timofeev (retired) 2013-10-05 06:12:35 UTC
Every docked window (except sidebar) can not be resized, it just shrinks to zero size with no possibility to be shown again.

E.g. Command window in Math, Navigator (F5) in Writer...

Regression from:

commit 16ea2dc1f572d698923c770a2a58f7ab402d1298
Author: Prashant Pandey <prashant3.yishu@gmail.com>
Date:   Sat Sep 7 23:53:02 2013 +0530

    Sidebar: Correcting anomalous mouse behaviour while resizing
Comment 1 Arnaud Versini 2013-10-06 15:29:34 UTC
confirmed on Ubuntu, mark as high importance.
Comment 2 Jan Holesovsky 2013-10-07 14:46:40 UTC
Adding to Most Annoying bugs.

Prashant: The problem is that mpSplitSet->mpItems[mnSplitPos].mnMaxSize can be -1 (meaning no limit) which here turns into -1 always; but even if we do something like

--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -2559,12 +2559,14 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
 
                 // where is the sidebar is attached?
                 if ( (mpSplitSet == mpMainSet) && mbBottomRight )
-                    nNewSize = mnMaxSize - mnMStartPos; // right hand side of the screen
+                    nNewSize = mnMaxSize - mnMSplitPos; // right hand side of the screen
                 else
-                    nNewSize = mnMStartPos; // left hand side of the screen
+                    nNewSize = mnMSplitPos; // left hand side of the screen
 
                 // do not make the sidebar wider than mnMaxSize
-                nNewSize = std::min(nNewSize, mpSplitSet->mpItems[mnSplitPos].mnMaxSize);
+                nNewSize = std::max(nNewSize, 0L);
+                if (mpSplitSet->mpItems[mnSplitPos].mnMaxSize > 0)
+                    nNewSize = std::min(nNewSize, mpSplitSet->mpItems[mnSplitPos].mnMaxSize);
 
                 SplitItem( mpSplitSet->mpItems[mnSplitPos].mnId, nNewSize,
                            bPropSmaller, bPropGreater );


there are still some corner cases that need to sort out, namingly:

* F5 + dock it
* make the Writer window smaller
* move the handle with the mouse to 0 and back, and see how the navigator keeps growing until it fills the entire window

Please have a look :-)
Comment 3 Jan Holesovsky 2013-10-07 14:57:02 UTC
I'll revert 16ea2dc1f572d698923c770a2a58f7ab402d1298 for now, let's push it again when we have the full solution.
Comment 4 Commit Notification 2013-10-07 17:21:25 UTC
Jan Holesovsky committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6f17d2bccbf8dd63736a49e227d1984da6a72a65

fdo#70160: Revert "Sidebar: Correcting anomalous mouse behaviour while resizing"



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Caolán McNamara 2013-10-11 18:47:01 UTC
So, is this fixed now and can be closed ?
Comment 6 Caolán McNamara 2013-11-14 15:31:34 UTC
I'm going to call this fixed. If I misunderstand feel free to reopen