src/osx/native_window.mm in reflexion-0.1.40 vs src/osx/native_window.mm in reflexion-0.1.41

- old
+ new

@@ -10,18 +10,18 @@ #include "event.h" #include "window.h" #import "opengl_view.h" -static const NSUInteger WINDOW_STYLE_MASK = - NSTitledWindowMask | - NSClosableWindowMask | - NSMiniaturizableWindowMask | - NSResizableWindowMask | - 0;//NSTexturedBackgroundWindowMask +static NSWindowStyleMask +default_style_mask () +{ + return Window_make_style_mask( + Reflex::Window::Data::FLAG_DEFAULT, + NSTitledWindowMask | NSTexturedBackgroundWindowMask); +} - static int count_mouse_buttons (const Reflex::PointerEvent& e) { uint nbuttons = 0; PointerEvent_each_pointer(&e, [&](const auto& pointer) { @@ -65,11 +65,11 @@ - (id) init { self = [super initWithContentRect: NSMakeRect(0, 0, 0, 0) - styleMask: WINDOW_STYLE_MASK + styleMask: default_style_mask() backing: NSBackingStoreBuffered defer: NO]; if (!self) return nil; pwindow = @@ -366,11 +366,11 @@ clicking_count -= count_mouse_buttons(e); if (clicking_count == 0) ++pointer_id; else if (clicking_count < 0) - Reflex::invalid_state_error(__FILE__, __LINE__); + return;//Reflex::invalid_state_error(__FILE__, __LINE__); Window_call_pointer_event(win, &e); } - (void) mouseDragged: (NSEvent*) event @@ -418,9 +418,9 @@ + (NSRect) frameRectForContentRect: (NSRect) contentRect { return [NSWindow frameRectForContentRect: contentRect - styleMask: WINDOW_STYLE_MASK]; + styleMask: default_style_mask()]; } @end// NativeWindow