summaryrefslogtreecommitdiff
path: root/src/Fl_cocoa.mm
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2014-08-27 11:55:57 +0000
committerManolo Gouy <Manolo>2014-08-27 11:55:57 +0000
commit8997131377a02004503c40ba2a96e6937bfd39c1 (patch)
tree666c4f7d681f1a47f4f3d8372b20d6fc96d2b582 /src/Fl_cocoa.mm
parent22beee52afd4e06e0f7fa2e19ce86e132b75730b (diff)
Added the Fl_Shaped_Window class to support windows of arbitrary shapes.
The new class is fully Doxygen-documented. Added an example program (example/shapedwindow.cxx) that exercises the new class. Modified all IDE-supporting files accordingly. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10255 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_cocoa.mm')
-rw-r--r--src/Fl_cocoa.mm7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 5de916139..68b21dc43 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -2361,6 +2361,7 @@ void Fl_X::flush()
fl_x_to_redraw = NULL;
}
+//bool Fl_X::make_shaped = false;
/*
* go ahead, create that (sub)window
@@ -2517,6 +2518,10 @@ void Fl_X::make(Fl_Window* w)
[cw setFrameOrigin:crect.origin];
[cw setHasShadow:YES];
[cw setAcceptsMouseMovedEvents:YES];
+ if (w->type() == FL_SHAPED_WINDOW) {
+ [cw setOpaque:NO]; // shaped windows must be non opaque
+ [cw setBackgroundColor:[NSColor clearColor]]; // and with transparent background color
+ }
x->xid = cw;
x->w = w; w->i = x;
x->wait_for_expose = 1;
@@ -2645,7 +2650,7 @@ void Fl_Window::show() {
labeltype(FL_NO_LABEL);
}
Fl_Tooltip::exit(this);
- if (!shown() || !i) {
+ if (!shown()) {
Fl_X::make(this);
} else {
if ( !parent() ) {