summaryrefslogtreecommitdiff
path: root/src/Fl_Screen_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-02-23 10:21:27 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-02-23 10:21:27 +0100
commit21c0134931ef22d6645fc182d7812776e14e369d (patch)
tree14e41d62f041a000214442be26aefb33eb911c02 /src/Fl_Screen_Driver.cxx
parentf9255e375cb4751404e33837cdddd6f2d31d96b9 (diff)
New member function const Fl_Image* Fl_Window::shape() replaces int Fl_Window::is_shaped()
The new function allows to get the window's shaping image and delete it after use, if appropriate.
Diffstat (limited to 'src/Fl_Screen_Driver.cxx')
-rw-r--r--src/Fl_Screen_Driver.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Fl_Screen_Driver.cxx b/src/Fl_Screen_Driver.cxx
index 4255d6444..44c92a5c7 100644
--- a/src/Fl_Screen_Driver.cxx
+++ b/src/Fl_Screen_Driver.cxx
@@ -330,7 +330,7 @@ void Fl_Screen_Driver::rescale_all_windows_from_screen(int screen, float f)
static void del_transient_window(void *data) {
Fl_Window *win = (Fl_Window*)data;
- delete (Fl_RGB_Image*)win->child(0)->user_data();
+ delete (Fl_Image*)win->shape();
Fl::delete_widget(win);
}
@@ -369,7 +369,6 @@ void Fl_Screen_Driver::transient_scale_display(float f, int nscreen)
b->color(Fl_Tooltip::color());
win->end();
win->shape(img);
- b->user_data(img);
win->user_data((void*)&transient_scale_display); // prevent this window from being rescaled later
win->set_output();
win->set_non_modal();