From 80a46ffa1d37b2821fa1348fe8a0fbe55cdac558 Mon Sep 17 00:00:00 2001 From: paul Date: Sun, 14 Oct 2007 09:33:34 +0000 Subject: [PATCH] gtk2: fix DbgDumpPixmap for gtk2 git-svn-id: trunk@12456 - --- lcl/interfaces/gtk/gtkdebug.pp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lcl/interfaces/gtk/gtkdebug.pp b/lcl/interfaces/gtk/gtkdebug.pp index 275a061461..f9a1e82e92 100644 --- a/lcl/interfaces/gtk/gtkdebug.pp +++ b/lcl/interfaces/gtk/gtkdebug.pp @@ -166,7 +166,13 @@ begin then begin w := 0; h:= 0; d := 0; end - else gdk_window_get_geometry(APixmap, nil,nil,@w,@h,@d); + else + {$ifdef gtk1} + gdk_window_get_geometry(APixmap, nil,nil,@w,@h,@d); + {$else} + gdk_drawable_get_size(APixmap, @w, @h); + d := gdk_drawable_get_depth(APixmap); + {$endif} if AWidth = -1 then AWidth := W; if AHeight = -1 then AHeight := H; Info^.Width := AWidth;