Cleanup for last commit
This commit is contained in:
@@ -1330,26 +1330,6 @@ BackBuffer::BackBuffer(int width, int height, Cairo::Format format) : x(0), y(0)
|
||||
}
|
||||
}
|
||||
|
||||
BackBuffer::BackBuffer(int width, int height, Glib::RefPtr<Gdk::Window> referenceWindow) : x(0), y(0), w(width), h(height), offset(0, 0), dirty(true)
|
||||
{
|
||||
if (w > 0 && h > 0 && referenceWindow) {
|
||||
Cairo::RefPtr<Cairo::Surface> surf = referenceWindow->create_similar_image_surface(Cairo::FORMAT_RGB24, w, h, 0);
|
||||
Cairo::SurfaceType type = surf->get_type();
|
||||
|
||||
if (type == Cairo::SURFACE_TYPE_IMAGE || type == Cairo::SURFACE_TYPE_WIN32) {
|
||||
surface = Cairo::RefPtr<Cairo::ImageSurface>::cast_static(surf);
|
||||
|
||||
if (!surface || !surface->get_width() || !surface->get_height()) {
|
||||
printf("ERRRROOOOORRRR!\n");
|
||||
}
|
||||
} else {
|
||||
printf("ERROR: wrong surface type. 0 or 7 was expected, but we've got %d instead.\n", type);
|
||||
}
|
||||
} else {
|
||||
w = h = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void BackBuffer::setDestPosition(int x, int y)
|
||||
{
|
||||
// values will be clamped when used...
|
||||
|
@@ -509,7 +509,6 @@ protected:
|
||||
public:
|
||||
BackBuffer();
|
||||
BackBuffer(int w, int h, Cairo::Format format = Cairo::FORMAT_RGB24);
|
||||
BackBuffer(int w, int h, Glib::RefPtr<Gdk::Window> referenceWindow);
|
||||
|
||||
// set the destination drawing rectangle; return true if the dimensions are different
|
||||
// Note: newW & newH must be > 0
|
||||
|
@@ -697,10 +697,8 @@ void ThumbBrowserBase::Internal::on_realize()
|
||||
bgn = style->get_background_color(Gtk::STATE_FLAG_NORMAL);
|
||||
bgs = style->get_background_color(Gtk::STATE_FLAG_SELECTED);
|
||||
|
||||
Glib::RefPtr<Gdk::Window> window = get_window();
|
||||
set_can_focus(true);
|
||||
add_events(Gdk::EXPOSURE_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::POINTER_MOTION_MASK | Gdk::SCROLL_MASK | Gdk::KEY_PRESS_MASK);
|
||||
//cc = window->create_cairo_context();
|
||||
set_has_tooltip (true);
|
||||
signal_query_tooltip().connect( sigc::mem_fun(*this, &ThumbBrowserBase::Internal::on_query_tooltip) );
|
||||
}
|
||||
@@ -842,8 +840,6 @@ bool ThumbBrowserBase::Internal::on_draw(const ::Cairo::RefPtr< Cairo::Context>
|
||||
|
||||
dirty = false;
|
||||
|
||||
Glib::RefPtr<Gdk::Window> window = get_window();
|
||||
|
||||
int w = get_width();
|
||||
int h = get_height();
|
||||
|
||||
|
@@ -61,7 +61,7 @@ void ThumbBrowserEntryBase::updateBackBuffer ()
|
||||
backBuffer.reset();
|
||||
}
|
||||
if (!backBuffer) {
|
||||
backBuffer = Glib::RefPtr<BackBuffer> ( new BackBuffer (exp_width, exp_height, Cairo::FORMAT_RGB24) );
|
||||
backBuffer = Glib::RefPtr<BackBuffer>(new BackBuffer(exp_width, exp_height));
|
||||
}
|
||||
|
||||
// If thumbnail is hidden by a filter, drawing to it will crash
|
||||
|
Reference in New Issue
Block a user