Wayland: activate min window size to get feedback about impact on users
This commit is contained in:
parent
6216165dec
commit
f66c142bbe
@ -23,7 +23,7 @@ the Wayland platform. It requires a Wayland-equipped OS which means Linux.
|
||||
Pre-existing platform-independent source code for FLTK 1.3.x should build and
|
||||
run unchanged with FLTK 1.4 and the Wayland platform.
|
||||
The code has been tested on Debian and Ubuntu with 3 distinct Wayland compositors:
|
||||
mutter (Debian's compositor), weston, and KDE.
|
||||
mutter (Gnome's compositor), weston, and KDE.
|
||||
CJK text-input methods, as well as dead and compose keys are supported.
|
||||
|
||||
|
||||
|
@ -1007,7 +1007,7 @@ ensure_border_surfaces(struct libdecor_frame_cairo *frame_cairo)
|
||||
frame_cairo->shadow.opaque = false;
|
||||
ensure_component(frame_cairo, &frame_cairo->shadow);
|
||||
|
||||
#if ! APPLY_FLTK_CHANGES
|
||||
#if 1 // ! APPLY_FLTK_CHANGES // activate this to get feedback about its impact
|
||||
libdecor_frame_get_min_content_size(&frame_cairo->frame,
|
||||
&min_width, &min_height);
|
||||
libdecor_frame_set_min_content_size(&frame_cairo->frame,
|
||||
|
@ -1406,12 +1406,12 @@ draw_title_bar(struct libdecor_frame_gtk *frame_gtk)
|
||||
libdecor_frame_set_min_content_size(&frame_gtk->frame, pref_width, 1);
|
||||
gtk_widget_size_allocate(frame_gtk->header, &allocation);
|
||||
#else // new code for FLTK
|
||||
int min_GTK_width = 15;
|
||||
/* // Comment out to remove need for hiding (see below) warnings sent to stderr
|
||||
//int min_GTK_width = 15;
|
||||
// Comment out to remove need for hiding (see below) warnings sent to stderr
|
||||
// just enough space not to create: Gtk-WARNING **: Negative content width ……
|
||||
min_GTK_width = 134;
|
||||
int min_GTK_width = 134;
|
||||
if (!libdecor_frame_has_capability(&frame_gtk->frame, LIBDECOR_ACTION_FULLSCREEN))
|
||||
min_GTK_width = 100; // no maximize button, window can be narrower*/
|
||||
min_GTK_width = 100; // no maximize button, window can be narrower
|
||||
int current_min_w, current_min_h;
|
||||
libdecor_frame_get_min_content_size(&frame_gtk->frame, ¤t_min_w, ¤t_min_h);
|
||||
bool need_change = false;
|
||||
@ -1441,12 +1441,12 @@ draw_title_bar(struct libdecor_frame_gtk *frame_gtk)
|
||||
return;
|
||||
}
|
||||
// hack to hide "Gtk-WARNING **: Negative content width" sent to stderr
|
||||
static FILE *null_stderr = NULL;
|
||||
/*static FILE *null_stderr = NULL;
|
||||
if (!null_stderr) null_stderr = fopen("/dev/null", "w+");
|
||||
FILE *old_stderr = stderr;
|
||||
stderr = null_stderr;
|
||||
gtk_widget_size_allocate(frame_gtk->header, &allocation); // warnings are sent here
|
||||
stderr = old_stderr;
|
||||
stderr = old_stderr;*/
|
||||
#endif // end of new code for FLTK
|
||||
draw_border_component(frame_gtk, &frame_gtk->headerbar, HEADER);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user