From 79012ca437ff3d7c25e4d164b1b9c3dccc2b4b7f Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sat, 27 Aug 2011 15:20:17 +0200 Subject: Remove NRRect from paint servers and temporary calculations (bzr r10582.1.4) --- src/widgets/desktop-widget.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/widgets/desktop-widget.cpp') diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index fff9c0a5c..cbfb8fe5f 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -731,15 +731,11 @@ sp_desktop_widget_realize (GtkWidget *widget) if (GTK_WIDGET_CLASS (dtw_parent_class)->realize) (* GTK_WIDGET_CLASS (dtw_parent_class)->realize) (widget); - NRRect d; - d.x0 = 0.0; - d.y0 = 0.0; - d.x1 = (dtw->desktop->doc())->getWidth (); - d.y1 = (dtw->desktop->doc())->getHeight (); + Geom::Rect d = Geom::Rect::from_xywh(Geom::Point(0,0), (dtw->desktop->doc())->getDimensions()); - if ((fabs (d.x1 - d.x0) < 1.0) || (fabs (d.y1 - d.y0) < 1.0)) return; + if (d.width() < 1.0 || d.height() < 1.0) return; - dtw->desktop->set_display_area (d.x0, d.y0, d.x1, d.y1, 10); + dtw->desktop->set_display_area (d.left(), d.top(), d.right(), d.bottom(), 10); dtw->updateNamedview(); } -- cgit v1.2.3