summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-03-03 09:46:37 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-03-03 09:46:37 +0100
commitd8cb8ec9167634d0e09201043ba8a539d659b849 (patch)
treeeb1389cebbc3707455dd6197b92b61fe34c383c2
parent47154602ddac68be9098cbb91011158ed69bdcf9 (diff)
Fix for issue #401. No longer attempt to transiently inactivate the maximize button.
This inactivation works with some window managers, but not with KDE or xfce. It's probably an issue of these WM rather than of FLTK.
-rw-r--r--src/Fl_Native_File_Chooser_GTK.cxx32
-rw-r--r--src/Fl_Native_File_Chooser_Kdialog.cxx30
2 files changed, 1 insertions, 61 deletions
diff --git a/src/Fl_Native_File_Chooser_GTK.cxx b/src/Fl_Native_File_Chooser_GTK.cxx
index b422dc711..6358c5ace 100644
--- a/src/Fl_Native_File_Chooser_GTK.cxx
+++ b/src/Fl_Native_File_Chooser_GTK.cxx
@@ -772,29 +772,6 @@ int Fl_GTK_Native_File_Chooser_Driver::fl_gtk_chooser_wrapper()
Fl_Event_Dispatch old_dispatch = Fl::event_dispatch();
// prevent FLTK from processing any event
Fl::event_dispatch(fnfc_dispatch);
- struct win_dims {
- Fl_Window *win;
- int minw,minh,maxw,maxh;
- struct win_dims *next;
- } *first_dim = NULL;
- // consider all bordered, top-level FLTK windows
- Fl_Window *win = Fl::first_window();
- while (win) {
- if (win->border()) {
- Fl_Window_Driver *dr = Fl_Window_Driver::driver(win);
- win_dims *dim = new win_dims;
- dim->win = win;
- dim->minw = dr->minw();
- dim->minh = dr->minh();
- dim->maxw = dr->maxw();
- dim->maxh = dr->maxh();
- //make win un-resizable
- win->size_range(win->w(), win->h(), win->w(), win->h());
- dim->next = first_dim;
- first_dim = dim;
- }
- win = Fl::next_window(win);
- }
gint response_id = GTK_RESPONSE_NONE;
fl_g_signal_connect_data(gtkw_ptr, "response", G_CALLBACK(run_response_handler), &response_id, NULL, (GConnectFlags) 0);
@@ -854,18 +831,11 @@ int Fl_GTK_Native_File_Chooser_Driver::fl_gtk_chooser_wrapper()
if ( response_id == GTK_RESPONSE_DELETE_EVENT) gtkw_ptr = NULL;
else fl_gtk_widget_hide (gtkw_ptr);
- // I think this is analogus to doing an Fl::check() - we need this here to make sure
+ // I think this is analogous to doing an Fl::check() - we need this here to make sure
// the GtkFileChooserDialog is removed from the display correctly
while (fl_gtk_events_pending ()) fl_gtk_main_iteration ();
Fl::event_dispatch(old_dispatch);
- while (first_dim) {
- win_dims *dim = first_dim;
- //give back win its resizing parameters
- dim->win->size_range(dim->minw, dim->minh, dim->maxw, dim->maxh);
- first_dim = dim->next;
- delete dim;
- }
return result;
} // fl_gtk_chooser_wrapper
diff --git a/src/Fl_Native_File_Chooser_Kdialog.cxx b/src/Fl_Native_File_Chooser_Kdialog.cxx
index 368a2b6ed..814f19d97 100644
--- a/src/Fl_Native_File_Chooser_Kdialog.cxx
+++ b/src/Fl_Native_File_Chooser_Kdialog.cxx
@@ -129,42 +129,12 @@ int Fl_Kdialog_Native_File_Chooser_Driver::show() {
Fl_Event_Dispatch old_dispatch = Fl::event_dispatch();
// prevent FLTK from processing any event
Fl::event_dispatch(fnfc_dispatch);
- struct win_dims {
- Fl_Window *win;
- int minw,minh,maxw,maxh;
- struct win_dims *next;
- } *first_dim = NULL;
- // consider all bordered, top-level FLTK windows
- Fl_Window *win = Fl::first_window();
- while (win) {
- if (!win->parent() && win->border()) {
- Fl_Window_Driver *dr = Fl_Window_Driver::driver(win);
- win_dims *dim = new win_dims;
- dim->win = win;
- dim->minw = dr->minw();
- dim->minh = dr->minh();
- dim->maxw = dr->maxw();
- dim->maxh = dr->maxh();
- //make win un-resizable
- win->size_range(win->w(), win->h(), win->w(), win->h());
- dim->next = first_dim;
- first_dim = dim;
- }
- win = Fl::next_window(win);
- }
// run event loop until pipe finishes
while (data.fd >= 0) Fl::wait();
Fl::remove_fd(fileno(pipe));
pclose(pipe);
// return to previous event processing by FLTK
Fl::event_dispatch(old_dispatch);
- while (first_dim) {
- win_dims *dim = first_dim;
- //give back win its resizing parameters
- dim->win->size_range(dim->minw, dim->minh, dim->maxw, dim->maxh);
- first_dim = dim->next;
- delete dim;
- }
if (data.all_files) {
// process text received from pipe
if (data.all_files[strlen(data.all_files)-1] == '\n') data.all_files[strlen(data.all_files)-1] = 0;