Bug Hunting Session
Bug 93821 - not storing & restoring window contents under menus ...
Summary: not storing & restoring window contents under menus ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.2.0
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2015-08-31 20:05 UTC by Michael Meeks
Modified: 2016-10-25 19:08 UTC (History)
1 user (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 Michael Meeks 2015-08-31 20:05:29 UTC
The LibreOffice code-base dates from an era when:
  a) rendering was impossibly slow and
  b) window managers didn't keep copies of occluded windows.

The world has move on since 1995 ;-) as such we should hack some of the complexity out here. The currently vcl/ menu structure literally screen-shots the area underneath a popup menu, stores it, tries to track if it is drawn over while the menu is up (to invalidate it), and then restores that afterwards.

At least - that's what it looks like checkout:

vcl/source/window/floatwin.cxx

checkout 'EnableSaveBackground' and others. In a nutshell I think we want to have:

vcl/inc/svdata.hxx:    bool                    mbNoSaveBackground;             // true: save background is unnecessary or even less performant

set - unconditionally true for all backends: and just push that through the code to remove the horrors =)

Thanks !
Comment 1 Robinson Tryon (qubit) 2015-12-10 11:40:54 UTC Comment hidden (obsolete)
Comment 2 Commit Notification 2016-02-01 08:13:41 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=01695131f3283d15e8fb803c7a342d0932d0e182

Resolves: tdf#93821 assume mbNoSaveBackground as true everywhere

It will be available in 5.2.0.

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 3 Caolán McNamara 2016-02-01 08:16:59 UTC
couldn't resist temptation given the amount of unused code that falls out after this removal
Comment 4 Michael Meeks 2016-02-01 15:10:38 UTC
Argh ! =) be strong, I managed to resist it ;-) Your penance - should you chose to accept it is to file another easy hack ! =) and also great to see you in Brussels ... of course.
Comment 5 Chris Sherlock 2016-02-02 12:15:09 UTC
Oh my goodness! That is truly amazing... I don't think I've ever seen so much code be obsoleted in a single bug fix... Great work!
Comment 6 Robinson Tryon (qubit) 2016-02-18 16:37:15 UTC Comment hidden (obsolete)