octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: figure positioning problem


From: Konstantinos Poulios
Subject: Re: figure positioning problem
Date: Fri, 8 Jun 2012 08:01:59 +0200

On Mon, Nov 21, 2011 at 2:30 PM, Ben Abbott <address@hidden> wrote:
> On Nov 21, 2011, at 2:13 AM, John W. Eaton wrote:
>
>> On 21-Nov-2011, "John W. Eaton" <address@hidden> wrote:
>>
>> | I checked it in.
>>
>> Then I backed it out, because I noticed that it caused worse problems
>> with some other figures, making them blank and with completely wrong
>> sizes.
>>
>> jwe
>
> John,
>
> I've been looking at problem with printing using FLTK. For example, the 
> images produced below are different.
>
>        close all
>        plot (rand (2)); print -r200 test1.png
>        drawnow
>        print -r200 test2.png
>
> Also, on MacOS using fltk-1.1.10-aqua, the plot canvas is not the proper 
> size. It looks to be off by about half the status bar (menu bar?) height.
>
> In any event, can you provide an example of the problem you are seeing? That 
> way I can keep an eye on it while I poke around looking for a solution to the 
> problems above.
>
> Ben

Hi Ben, the attached patch seems to solve the issue with your last
test. Actually the situation with figure positioning is quite a mess
because the information has to go in both directions:

- the toolkit touches the figure position property through
set_boundingbox and this can be triggered by different X events during
Fl:check() (e.g. when the user resizes the window).
- octave touches the figure position through set_position directly
(e.g. on user request through set(gcf, ....)).

The attached patch fixes a kind of race condition, where on my system
most times the toolkit managed to reset the figure positioning through
some X event before octave managed to propagate its position request
to the toolkit and the Xserver. So, the value requested by octave was
reverted to the last value X was aware of.

Please test the attached patch so that we can push it.

Kostas

P.S.: one point changed by this patch is:
fp.set_boundingbox (pos, /* do_notify_toolkit */ true);
to
fp.set_boundingbox (pos, /* do_notify_toolkit */ false);
it doesn't make any sense to me that the toolkit does a change and at
the same time requests to be notified about this change.

Attachment: figure_positioning.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]