On 2008-04-04 20:23:47 +0200, Boyd Waters <[EMAIL PROTECTED]> said:

This is a known issue in the current alpha, when dispatching mouse events, the global pos is in the "Cocoa" coordinates which has (0, 0) at the bottom left instead of top left.


Ahh, yes... good old Display Postscript!

From the "View Programming Guide for Cocoa":
Specifying that a view subclass uses a flipped coordinate system is done by overriding the isFlipped method. The default implementation of NSView returns NO, which means that the origin of the coordinate system lies at the lower-left corner of the default bounds rectangle, and the y-axis runs from bottom to top. When a subclass overrides this method to returnYES, the view machinery automatically adjusts itself to assume that the upper-left corner is the origin.


Oh, I see..

in src/gui/kernel/qcocoaview.mm


you already have

- (BOOL)isFlipped;
{
    return YES;
}


So how should we work around the mouse-event reporting problem, I'm still thinking about it...

As I said, the problem was the global coordinates. The local coordinates should be OK. At least they are when I try things here.

Anyway, it should be in better shape for the next beta, and hopefully I'll get to that after finishing up some things with 4.4.

Hope this helps,

-- Trenton

To unsubscribe - send "unsubscribe" in the subject to [EMAIL PROTECTED]

Reply via email to