diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-02-12 14:12:58 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-02-12 14:12:58 +0000 |
commit | 8bfbf5bda11fcdae12f28bf6fc6bca910aaec411 (patch) | |
tree | 3b074b9f73e6a384166c813c0524d34f59fb6afb /gtk2_ardour/splash.cc | |
parent | a1955a82e81816161f5b7dbf460a694e902237b0 (diff) |
alter a previous change re: transport menu shortening; fix splash screen crash in some window managers; some code to get me a .png of a cursor
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3039 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/splash.cc')
-rw-r--r-- | gtk2_ardour/splash.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gtk2_ardour/splash.cc b/gtk2_ardour/splash.cc index 7f68f85216..1b0bca2e03 100644 --- a/gtk2_ardour/splash.cc +++ b/gtk2_ardour/splash.cc @@ -48,6 +48,7 @@ Splash::Splash () add (darea); + set_default_size (pixbuf->get_width(), pixbuf->get_height()); the_splash = this; } @@ -78,12 +79,17 @@ Splash::expose (GdkEventExpose* ev) { RefPtr<Gdk::Window> window = darea.get_window(); + /* note: height & width need to be constrained to the pixbuf size + in case a WM provides us with a screwy allocation + */ + window->draw_pixbuf (get_style()->get_bg_gc (STATE_NORMAL), pixbuf, ev->area.x, ev->area.y, ev->area.x, ev->area.y, - ev->area.width, ev->area.height, + min ((pixbuf->get_width() - ev->area.x), ev->area.width), + min ((pixbuf->get_height() - ev->area.y), ev->area.height), Gdk::RGB_DITHER_NONE, 0, 0); - + Glib::RefPtr<Gtk::Style> style = darea.get_style(); Glib::RefPtr<Gdk::GC> white = style->get_white_gc(); |