Open extrawurst opened 9 years ago
I used the code from the readme:
import devisualization.window.window;
import std.stdio;
void main() {
Window window = new Window(800, 600, "My window!"w);
window.show();
window.addOnDraw((Windowable window2) {
writeln("drawing");
});
while(true) {
import core.thread : Thread;
import core.time : dur;
Window.messageLoopIteration();
if (window.hasBeenClosed)
break;
else
window.onDraw();
//Thread.sleep(dur!"msecs"(25));
}
}
I've had a small play around with it. From what I can tell, is that NSWindow's initWithContentRect:styleMask:backing:defer: method is not properly obeying the x and y coordinates being given to it.
I am seriously surprised y coordinate isn't causing more problems as that is the one that gets estimated. y coord estimation
At this point, I would like this to be fixed, but I I'm not sure how that could be done.
honestly i think the whole reason is that if not given any specific x an y coords, the createWindow defaults to x and y being zero and not obeying the OS's default when creating the window.
On Sun, Feb 22, 2015 at 12:33 AM, Richard Andrew Cattermole < notifications@github.com> wrote:
I've had a small play around with it. From what I can tell, is that NSWindow's initWithContentRect:styleMask:backing:defer: https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/#//apple_ref/occ/instm/NSWindow/initWithContentRect:styleMask:backing:defer: method is not properly obeying the x and y coordinates being given to it.
I am seriously surprised y coordinate isn't causing more problems as that is the one that gets estimated. y coord estimation https://github.com/Devisualization/window/blob/master/cocoa_library/project/dwc-osx/window.m#L38
At this point, I would like this to be fixed, but I I'm not sure how that could be done.
— Reply to this email directly or view it on GitHub https://github.com/Devisualization/window/issues/9#issuecomment-75399459 .
it is moving there after being created on a "normal" position in the center area of the screen and moves it self to the top left position - that looks weird