Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - Fix for "white background" bug when resizing windo
Fix for "white background" bug when resizing windo
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon May 23, 2011 3:11 am    Post subject: Fix for "white background" bug when resizing windo

While doing some unrelated NeoOffice coding, I think that I found a way to stop the annoying bug in Apple's Java that causes a window's entire background to be painted white when you resize a window. This is a very old bug that has been in every version of Apple's Java that NeoOffice has used so hopefully my fix works.

Can anyone install the following test patch and tell us if they see any repainting problems? If my fix does not work, you would see parts of a window turn white and not repaint after resizing, unminimizing, or unzooming a window:

Intel:
http://joe.neooffice.org/test/NeoOffice-3.2-Patch-2-Test-4-Intel.dmg

Patrick
Back to top
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Mon May 23, 2011 2:04 pm    Post subject:

It doesn't show any white when making it smaller.

When making it bigger, it has white on the parts that were not in the window before (which is perfectly logical) for a moment and then it draws the new bit. Funny thing is that you can see multiple sets of status and scroll bars drawn if you expand the window at the right speed.

Presumably, the pretty thing would be to either leave the new area white until the user release the window, or redraw everything, not just the new bit.

best wishes,
Oscar

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon May 23, 2011 5:42 pm    Post subject:

ovvldc wrote:
....Funny thing is that you can see multiple sets of status and scroll bars drawn if you expand the window at the right speed.


I cannot reproduce that behavior. Is there a certain type of window size change patterns that you see this happen?

Patrick
Back to top
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Mon May 23, 2011 10:35 pm    Post subject:

pluby wrote:
I cannot reproduce that behavior. Is there a certain type of window size change patterns that you see this happen?


I started at maximum size, then reduced, then expanded..

Let us see if anyone else gets it.

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Tue May 24, 2011 11:59 am    Post subject:

I can see something that's perhaps what Oscar is seeing?

If I take a blank Writer document, expand the window to the point where the horizontal scrollbar disappears, and then expand and contract the window various amounts at various speeds, when expanding the window I'll occasionally briefly see artifacts of a scrollbar in the old position, as well as the real scrollbar in the new position, until the newly-added area of the window is repainted.

Mostly, though, I see only the old scrollbar, and don't see the new one until the newly-added window area has been repainted (thereby erasing the old scrollbar entirely).

10.5.8/Intel.

At any rate, the new resizing behavior, while not perfect, still seems far superior to blanking the whole window white during resizes. Smile

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sat May 28, 2011 2:47 am    Post subject:

I think I have found a way to "coalesce" a series of window resize events when they occur rapidly one after another. Hopefully, this change will eliminate the behavior that ovvldc is seeing:

Intel:
http://joe.neooffice.org/test/NeoOffice-3.2-Patch-2-Test-5-Intel.dmg

Patrick
Back to top
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Sat May 28, 2011 10:36 am    Post subject:

pluby wrote:
I think I have found a way to "coalesce" a series of window resize events when they occur rapidly one after another. Hopefully, this change will eliminate the behavior that ovvldc is seeing


OK, I will test later. Have to go and dance tango now.

Best wishes,
Oscar

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Sun May 29, 2011 11:12 am    Post subject:

OK, I tested. Now I find that the window only updates after I release the mouse button, which is fine with me, but maybe not what you intended.

I also wonder if I am having artefacts in the scroll bars. See attached screenshot.

Best wishes,
Oscar

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sun May 29, 2011 2:36 pm    Post subject:

ovvldc wrote:
OK, I tested. Now I find that the window only updates after I release the mouse button, which is fine with me, but maybe not what you intended.


I agree. My latest test patch limits relayout of the content too infrequently when resizing the window. The good news is that my test patch stopped the excessive number of relayouts so now I should be able to implement somewhere in the middle by adding back some timing code to limit relayout to a maximum of 500 milliseconds.

ovvldc wrote:
I also wonder if I am having artefacts in the scroll bars. See attached screenshot.


That has been a known issue when resizing for a long time. For some unknown reason, the OpenOffice.org code does not redraw any pixels in the space between the horizontal scrollbar and the status bar in Writer so the pixels from the previous size remain there (if you look real close, you can see that the black artifacts are the text in status bar when the status bar when the bottom of the window was higher).

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon May 30, 2011 3:13 am    Post subject:

I have implemented the "timer" approach that I described in my last post in the following test patch. With this test patch, the contents should relayout during window resizing but only at a maximum of 4 times per second to prevent the original problem that ovvldc found does not occur:

Intel:
http://joe.neooffice.org/test/NeoOffice-3.2-Patch-2-Test-6-Intel.dmg

Patrick
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Tue May 31, 2011 2:21 pm    Post subject:

I don't see much difference in Test-6 (over the original Test-4; I never got to Test-5), but it's perhaps a bit smoother, and harder to trigger the slow/partial repaints that led to some of the weirder renderings I'd seen before Smile

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Wed Jun 01, 2011 1:12 am    Post subject:

sardisson wrote:
I don't see much difference in Test-6 (over the original Test-4; I never got to Test-5), but it's perhaps a bit smoother, and harder to trigger the slow/partial repaints that led to some of the weirder renderings I'd seen before Smile


That is good news. Test-6 should be a smoother version of Test-4. In contrast, Test-5 "froze" the content size during resizing and did not do any repainting until the user finished resizing the window.

Patrick
Back to top
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Thu Jun 02, 2011 11:16 am    Post subject:

I can confirm that. The redraw actually takes visibly long on my unibody macbook, as in a brief stutter, but nothing untoward.

Definitely an improvement on the old behaviour, I would say. Well done.

best wishes,
Oscar

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu Jun 02, 2011 1:44 pm    Post subject:

OK. I am planning on releasing NeoOffice 3.2 Patch 3 in the next few days and I will include this new window resizing code in that patch.

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Wed Jun 08, 2011 11:42 am    Post subject:

I found a small bug in the last test patch that occurs only on Mac OS X 10.7. When you set NeoOffice 3.2 with the test patch to launch at login in hidden mode and then make NeoOffice the active application, most of each window will be white until you resize each window.

I have fixed this bug and, hopefully, I have not caused any change in the window resizing behavior on Mac OS X 10.5 and 10.6. Can anyone install the test patch and confirm that the following test patch works as well as the last test patch?:

Intel:
http://joe.neooffice.org/test/NeoOffice-3.2-Patch-2-Test-7-Intel.dmg

Patrick
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.