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