gtk: SetShape - also shape fixed widget (fixes issue #0016074)

git-svn-id: trunk@24644 -
This commit is contained in:
paul 2010-04-16 02:58:01 +00:00
parent 42558682c9
commit 338187d10c

View File

@ -37,7 +37,7 @@ uses
SysUtils, Classes, Controls, LMessages, InterfaceBase, SysUtils, Classes, Controls, LMessages, InterfaceBase,
WSControls, WSLCLClasses, WSProc, WSControls, WSLCLClasses, WSProc,
Graphics, ComCtrls, Forms, LCLType, Graphics, ComCtrls, Forms, LCLType,
GtkDef, GTKExtra; GtkDef, GTKExtra, GtkDebug;
type type
@ -653,13 +653,14 @@ end;
class procedure TGtkWSWinControl.SetShape(const AWinControl: TWinControl; class procedure TGtkWSWinControl.SetShape(const AWinControl: TWinControl;
const AShape: HBITMAP); const AShape: HBITMAP);
var var
GtkWidget: PGtkWidget; GtkWidget, FixedWidget: PGtkWidget;
GdkBitmap: PGDKBitmap; GdkBitmap: PGDKBitmap;
begin begin
if not WSCheckHandleAllocated(AWinControl, 'SetShape') then if not WSCheckHandleAllocated(AWinControl, 'SetShape') then
Exit; Exit;
GtkWidget := PGtkWidget(AWinControl.Handle); GtkWidget := PGtkWidget(AWinControl.Handle);
FixedWidget := GetFixedWidget(GtkWidget);
if AShape <> 0 then if AShape <> 0 then
begin begin
@ -672,6 +673,8 @@ begin
GdkBitmap := nil; GdkBitmap := nil;
gtk_widget_shape_combine_mask(GtkWidget, GdkBitmap, 0, 0); gtk_widget_shape_combine_mask(GtkWidget, GdkBitmap, 0, 0);
if FixedWidget <> GtkWidget then
gtk_widget_shape_combine_mask(FixedWidget, GdkBitmap, 0, 0);
end; end;
{ {