mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 21:19:24 +02:00
git-svn-id: trunk@35125 -
This commit is contained in:
parent
3f31fe6afc
commit
e96f8fdf7b
@ -490,6 +490,7 @@ procedure TGtkDeviceContext.SetWidget(AWidget: PGtkWidget; AWindow: PGdkWindow;
|
|||||||
|
|
||||||
var
|
var
|
||||||
ClientWidget: PGtkWidget;
|
ClientWidget: PGtkWidget;
|
||||||
|
W: PGtkWidget;
|
||||||
begin
|
begin
|
||||||
if FWidget <> nil then
|
if FWidget <> nil then
|
||||||
RaiseWidgetAlreadySet;
|
RaiseWidgetAlreadySet;
|
||||||
@ -521,8 +522,16 @@ begin
|
|||||||
AWindow := GetControlWindow(ClientWidget);
|
AWindow := GetControlWindow(ClientWidget);
|
||||||
if AWindow = nil then
|
if AWindow = nil then
|
||||||
begin
|
begin
|
||||||
//force creation
|
W := gtk_widget_get_parent(AWidget);
|
||||||
gtk_widget_realize(ClientWidget);
|
//we are forcing window creation but not for GtkNotebook
|
||||||
|
//see issue #18754 and #20126
|
||||||
|
//Zeljko:This part should be NOT BE REMOVED since TToolbar, TFrame
|
||||||
|
//TGroupBox etc...depend on this. eg.TToolbar will lock
|
||||||
|
//mouse without realizing clientWidget.Also if THintWindow is
|
||||||
|
//visible it crashes sometimes. SO JUST NOTEBOOK !
|
||||||
|
if (W <> nil) and not GTK_IS_NOTEBOOK(W) then
|
||||||
|
gtk_widget_realize(ClientWidget);
|
||||||
|
|
||||||
AWindow := GetControlWindow(ClientWidget);
|
AWindow := GetControlWindow(ClientWidget);
|
||||||
// Don't raise an exception. Not all operations needs drawable. For example font metrics:
|
// Don't raise an exception. Not all operations needs drawable. For example font metrics:
|
||||||
// http://bugs.freepascal.org/view.php?id=14035
|
// http://bugs.freepascal.org/view.php?id=14035
|
||||||
|
Loading…
Reference in New Issue
Block a user