Issue 73689 - aquavcl01-> fix redrawing/refresh issue on Aqua version
Summary: aquavcl01-> fix redrawing/refresh issue on Aqua version
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: MacOSX (show other issues)
Version: 680m196
Hardware: All Mac OS X, all
: P3 Trivial (vote)
Target Milestone: OOo 2.3
Assignee: tino.rachui
QA Contact: issues@porting
URL:
Keywords: aqua
: 77555 77558 (view as issue list)
Depends on:
Blocks: 74396
  Show dependency tree
 
Reported: 2007-01-20 21:56 UTC by eric.bachard
Modified: 2007-07-09 22:21 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
fix for the initial show problem of writer (783 bytes, patch)
2007-05-10 18:41 UTC, philipp.lohmann
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description eric.bachard 2007-01-20 21:56:59 UTC
This issue is one of 10 most important issues to fix before first public release of native ( Aqua , without 
X11) version of OpenOffice.org on Mac OS X

To be fixed : 

When launching Aqua version of OpenOffice.org, some part are not drawn, and only resize the main 
window makes everything appear as it should be 

To do : review code and fix the problem
Comment 1 eric.bachard 2007-01-22 11:41:26 UTC
Setting keyword
Comment 2 shaunmcdonald131 2007-02-10 10:34:37 UTC
Adding to Meta Issue.
Comment 3 sebastien.plisson 2007-03-05 20:48:25 UTC
With the idea of paveljanik, Added function

void AquaSalGraphics::RefreshRect(float lX, float lY, float lWidth, float lHeight)
{
	fprintf(stderr,"-->%s refresh %f - %f - %f - %f\n",__func__,lX, lY,lWidth,lHeight);
	// Refresh windows content
	Rect aRect;
    aRect.left = static_cast<float>(lX);
    aRect.top = static_cast<float>(lY);
    aRect.right = static_cast<float>(lWidth);
    aRect.bottom = static_cast<float>(lHeight);
	
	InvalWindowRect(mrWindow, &aRect);
} 

to salgdiutils.ccx, and get good refresh, adding it step by step to drawing
function that need it
Comment 4 sebastien.plisson 2007-03-07 10:18:52 UTC
With the refreshrect : i ve got all icons appearing at startup of writer, text 
being typed appears on screen (need still soem fixin) : in svdem8svtool the 
cursor run fine while typing, in writer the cursor is logically moved but 
still blinking at the beginning of the line...
Comment 5 eric.bachard 2007-04-24 16:06:02 UTC
ericb->plipli

did you progress since ?
Comment 6 sebastien.plisson 2007-04-24 16:55:59 UTC
plipli->ericb

I've discussed with ismael to inform him about what HIframework will bring to
enhance considerably :
the refresh management, "speed up" the implementation of native controls (GsoC
applicatio nof ismael).

All the helpers we ll register automatically will bring us native refresh
without many lines of code :-)
so cheers :-)
Comment 7 philipp.lohmann 2007-05-10 18:41:41 UTC
Created attachment 45031 [details]
fix for the initial show problem of writer
Comment 8 philipp.lohmann 2007-05-10 18:42:13 UTC
Attached patch fixes Writer's initial show problem for me.
Comment 9 pavel 2007-05-11 06:45:11 UTC
The change changed refresh of FirstStart wizard window.

Before the change, the window got refreshed when the mouse moved over some button or text entity, not 
it is not refreshed at all, only the native buttons are shown when the mouse walks over them.
Comment 10 philipp.lohmann 2007-05-11 09:57:16 UTC
True. I wonder why this seems to be the only dialog that shows this ? I need to
investigate further.
Comment 11 eric.bachard 2007-05-11 10:09:57 UTC
I found another one, with base : same for Base wizard when you try to create a
new .odb document.
Only buttons are refreshed when moving the mouse , but the window is not.

Searching other ...
Comment 12 philipp.lohmann 2007-05-11 12:54:30 UTC
I think i found the new problem. It goes like this:

at first GetClientSize did not return (0,0) initially. Which it should do since
this is our only indicator for the visible/non visible state (historical
reasons, on windows that was the case automatically). The change form (0,0) to
(whatever,whatever) after Show(TRUE) triggers activation handling in writer.
This is why writer initially didn't paint, but toolbars and other widgets did
(they go a paint after all :-) ).

Changing that however triggered new dialog behaviour: the dialogs consider
themselves resized now and immediately paint (without waiting for a paint
event). This works on Windows and X11, but does not seem to with Carbon. It
would not matter, if there came a system paint event afterwards (which one would
expect after a Show), however occasionally, this does not come anymore (which I
found out with the stderr output). Why, I cannot say, I can only guess that the
immediate painting is the culprit and interferes with the system's event
handling (I could imagine the calling of HIViewSetNeedsDisplayInRect interferes
with the paint event hadling).

However one can force the issue by calling InvalidateWindowRect after
ShowWindow; this seems to trigger the expected system paint event regardless of
the immediate painting. Checked in according change.

Does anyone have a better solution ?
Comment 13 sebastien.plisson 2007-05-14 09:32:29 UTC
plipli -> pl

You are true about events of painting.
When the window is resized (ie maximized) events are fired and well handled .

SetHINeedsDisplay(HIViewid) only tells Carbon that this HIview has to be
refreshed next time the applicationeventloop/Quartz will do a refresh. It is
used when we call refreshrect (after something drawn ahs to be visible immediately).

I m not sure but I don t think the HI* code that disable paint/vcl event
handling was committed so it should handle windowdraw content event. but
salpaint event was disabled some times ago (because of slowing down issue).

Hope this will help the vcl guru you are :-)
Comment 14 eric.bachard 2007-05-19 08:31:17 UTC
*** Issue 77555 has been marked as a duplicate of this issue. ***
Comment 15 eric.bachard 2007-05-19 08:32:55 UTC
*** Issue 77558 has been marked as a duplicate of this issue. ***
Comment 16 eric.bachard 2007-05-23 13:35:57 UTC
issue just fixed by hdu 


Please verify 
Comment 17 pavel 2007-06-26 15:43:29 UTC
Verified in aquavcl01. No need to resize initially.
Comment 18 pavel 2007-06-26 15:43:32 UTC
Verified in aquavcl01. No need to resize initially.
Comment 19 pavel 2007-06-28 06:58:48 UTC
Change target milestone to 2.3.
Comment 20 eric.bachard 2007-07-09 22:21:26 UTC
Verified Ok in SRC680_m220

Closing