mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
Bail out early if a screen isn't found
This commit is contained in:
parent
7d559de3d0
commit
9fbcecf2f5
1 changed files with 10 additions and 10 deletions
|
|
@ -231,18 +231,18 @@ GenericPluginUI::scroller_size_request (Gtk::Requisition* a)
|
||||||
screen = get_screen();
|
screen = get_screen();
|
||||||
}
|
}
|
||||||
|
|
||||||
int maximum_width = -1;
|
if (!screen) {
|
||||||
|
return;
|
||||||
if (screen) {
|
|
||||||
Gdk::Rectangle monitor;
|
|
||||||
const int monitor_num = screen->get_monitor_at_window (get_window ());
|
|
||||||
screen->get_monitor_geometry (
|
|
||||||
(monitor_num < 0) ? 0 : monitor_num,
|
|
||||||
monitor);
|
|
||||||
|
|
||||||
maximum_width = monitor.get_width() * 0.9;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Gdk::Rectangle monitor;
|
||||||
|
const int monitor_num = screen->get_monitor_at_window (window);
|
||||||
|
screen->get_monitor_geometry (
|
||||||
|
(monitor_num < 0) ? 0 : monitor_num,
|
||||||
|
monitor);
|
||||||
|
|
||||||
|
const int maximum_width = monitor.get_width() * 0.9;
|
||||||
|
|
||||||
GtkRequisition request = hpacker.size_request();
|
GtkRequisition request = hpacker.size_request();
|
||||||
|
|
||||||
if (request.width > maximum_width) {
|
if (request.width > maximum_width) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue