mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 20:55:48 +01:00
forward port of 7539 from 2.x
git-svn-id: svn://localhost/ardour2/branches/3.0@7667 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
43bcb7f72b
commit
71a4796dc3
8 changed files with 59 additions and 40 deletions
|
|
@ -1054,3 +1054,32 @@ control_link (ScopedConnectionList& scl, boost::shared_ptr<Controllable> c, Gtk:
|
|||
gui_context());
|
||||
}
|
||||
|
||||
int
|
||||
physical_screen_height (Glib::RefPtr<Gdk::Window> win)
|
||||
{
|
||||
GdkScreen* scr = gdk_screen_get_default();
|
||||
|
||||
if (win) {
|
||||
GdkRectangle r;
|
||||
gint monitor = gdk_screen_get_monitor_at_window (scr, win->gobj());
|
||||
gdk_screen_get_monitor_geometry (scr, monitor, &r);
|
||||
return r.height;
|
||||
} else {
|
||||
return gdk_screen_get_height (scr);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
physical_screen_width (Glib::RefPtr<Gdk::Window> win)
|
||||
{
|
||||
GdkScreen* scr = gdk_screen_get_default();
|
||||
|
||||
if (win) {
|
||||
GdkRectangle r;
|
||||
gint monitor = gdk_screen_get_monitor_at_window (scr, win->gobj());
|
||||
gdk_screen_get_monitor_geometry (scr, monitor, &r);
|
||||
return r.width;
|
||||
} else {
|
||||
return gdk_screen_get_width (scr);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue