Virtual member Fl_Window_Driver::makeWindow() now returns void

This commit is contained in:
ManoloFLTK 2023-01-09 17:20:57 +01:00
parent a5b431e35e
commit 9bdaf5a84d
9 changed files with 12 additions and 17 deletions

View File

@ -141,7 +141,7 @@ public:
virtual void make_current();
virtual void label(const char *name, const char *mininame);
virtual Fl_X *makeWindow() { return 0; }
virtual void makeWindow() {}
virtual void wait_for_expose();
virtual void destroy_double_buffer();
virtual void show();

View File

@ -2854,7 +2854,7 @@ void Fl_Cocoa_Window_Driver::flush()
/*
* go ahead, create that (sub)window
*/
Fl_X* Fl_Cocoa_Window_Driver::makeWindow()
void Fl_Cocoa_Window_Driver::makeWindow()
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
Fl_Group::current(0);
@ -3070,7 +3070,6 @@ Fl_X* Fl_Cocoa_Window_Driver::makeWindow()
// if (w->modal()) { Fl::modal_ = w; fl_fix_focus(); }
if (!w->parent()) [myview did_view_resolution_change]; // to set mapped_to_retina to its current state
[pool release];
return x;
}
void Fl_Cocoa_Window_Driver::fullscreen_on() {

View File

@ -2006,7 +2006,7 @@ void fl_fix_focus(); // in Fl.cxx
UINT fl_wake_msg = 0;
int fl_disable_transient_for; // secret method of removing TRANSIENT_FOR
Fl_X *Fl_WinAPI_Window_Driver::makeWindow() {
void Fl_WinAPI_Window_Driver::makeWindow() {
Fl_Group::current(0); // get rid of very common user bug: forgot end()
fl_open_display();
@ -2017,7 +2017,7 @@ Fl_X *Fl_WinAPI_Window_Driver::makeWindow() {
Fl_Window *w = pWindow;
if (w->parent() && !Fl_X::i(w->window())) {
w->set_visible();
return 0L;
return;
}
static NameList class_name_list;
@ -2248,8 +2248,6 @@ Fl_X *Fl_WinAPI_Window_Driver::makeWindow() {
if (!im_enabled)
flImmAssociateContextEx((HWND)x->xid, 0, 0);
return x;
}

View File

@ -115,7 +115,7 @@ public:
const Fl_Image* shape() FL_OVERRIDE;
// --- window management
Fl_X *makeWindow() FL_OVERRIDE;
void makeWindow() FL_OVERRIDE;
void take_focus() FL_OVERRIDE;
void flush() FL_OVERRIDE;
void flush_overlay() FL_OVERRIDE;

View File

@ -98,7 +98,7 @@ public:
const Fl_Image* shape() FL_OVERRIDE;
// --- window management
Fl_X *makeWindow() FL_OVERRIDE;
void makeWindow() FL_OVERRIDE;
void take_focus() FL_OVERRIDE;
void flush() FL_OVERRIDE;
void flush_overlay() FL_OVERRIDE;

View File

@ -1101,14 +1101,14 @@ static void process_menu_or_tooltip(struct wld_window *new_window) {
}
Fl_X *Fl_Wayland_Window_Driver::makeWindow()
void Fl_Wayland_Window_Driver::makeWindow()
{
struct wld_window *new_window;
Fl_Wayland_Screen_Driver::output *output;
wait_for_expose_value = 1;
if (pWindow->parent() && !pWindow->window()) return NULL;
if (pWindow->parent() && !pWindow->window()->shown()) return NULL;
if (pWindow->parent() && !pWindow->window()) return;
if (pWindow->parent() && !pWindow->window()->shown()) return;
new_window = (struct wld_window *)calloc(1, sizeof *new_window);
new_window->fl_win = pWindow;
@ -1220,7 +1220,6 @@ Fl_X *Fl_Wayland_Window_Driver::makeWindow()
pWindow->redraw();
// make sure each popup is mapped with its constraints before mapping next popup
if (pWindow->menu_window()) pWindow->wait_for_expose();
return xp;
}
Fl_Wayland_Window_Driver::type_for_resize_window_between_screens Fl_Wayland_Window_Driver::data_for_resize_window_between_screens_ = {0, false};

View File

@ -85,7 +85,7 @@ public:
const Fl_Image* shape() FL_OVERRIDE;
// --- window management
Fl_X *makeWindow() FL_OVERRIDE;
void makeWindow() FL_OVERRIDE;
void size_range() FL_OVERRIDE {
// currently nothing to do
}

View File

@ -99,7 +99,7 @@ public:
const Fl_Image* shape() FL_OVERRIDE;
// --- window management
Fl_X *makeWindow() FL_OVERRIDE;
void makeWindow() FL_OVERRIDE;
void take_focus() FL_OVERRIDE;
void flush_double() FL_OVERRIDE;
void flush_overlay() FL_OVERRIDE;

View File

@ -550,10 +550,9 @@ int Fl_X11_Window_Driver::scroll(int src_x, int src_y, int src_w, int src_h, int
return 0;
}
Fl_X *Fl_X11_Window_Driver::makeWindow()
void Fl_X11_Window_Driver::makeWindow()
{
Fl_X::make_xid(pWindow, fl_visual, fl_colormap);
return Fl_X::i(pWindow);
}
const Fl_Image* Fl_X11_Window_Driver::shape() {