diff options
| author | Manolo Gouy <Manolo> | 2016-03-23 13:13:00 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-03-23 13:13:00 +0000 |
| commit | a114e3ab4d9fa408061003c04a95b293b3842f24 (patch) | |
| tree | e2aed2f3ecaba5b38290700159cef16c01fab292 /src/Fl_cocoa.mm | |
| parent | 270b437500552cba0d082363f9124456f16a1fda (diff) | |
Rewrite Fl_Window::handle(int) under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11403 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_cocoa.mm')
| -rw-r--r-- | src/Fl_cocoa.mm | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 68d1631d1..35239835e 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -3528,24 +3528,30 @@ void Fl_X::destroy() { delete subRect(); } -void Fl_X::map() { - if (w && xid && ![xid parentWindow]) { // 10.2 + +void Fl_Cocoa_Window_Driver::map() { + Window xid = fl_xid(pWindow); + if (pWindow && xid && ![xid parentWindow]) { // 10.2 // after a subwindow has been unmapped, it has lost its parent window and its frame may be wrong [xid setSubwindowFrame]; } - if (cursor) { - [(NSCursor*)cursor release]; - cursor = NULL; + Fl_X *i = Fl_X::i(pWindow); + if (i->cursor) { + [(NSCursor*)i->cursor release]; + i->cursor = NULL; } } -void Fl_X::unmap() { - if (w && xid) { - if (w->parent()) [[xid parentWindow] removeChildWindow:xid]; // necessary with at least 10.5 + +void Fl_Cocoa_Window_Driver::unmap() { + Window xid = fl_xid(pWindow); + if (pWindow && xid) { + if (pWindow->parent()) [[xid parentWindow] removeChildWindow:xid]; // necessary with at least 10.5 [xid orderOut:nil]; } } + // intersects current and x,y,w,h rectangle and returns result as a new Fl_Region Fl_Region Fl_X::intersect_region_and_rect(Fl_Region current, int x,int y,int w, int h) { |
