mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 20:28:19 +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
|
||||
ClientWidget: PGtkWidget;
|
||||
W: PGtkWidget;
|
||||
begin
|
||||
if FWidget <> nil then
|
||||
RaiseWidgetAlreadySet;
|
||||
@ -521,8 +522,16 @@ begin
|
||||
AWindow := GetControlWindow(ClientWidget);
|
||||
if AWindow = nil then
|
||||
begin
|
||||
//force creation
|
||||
gtk_widget_realize(ClientWidget);
|
||||
W := gtk_widget_get_parent(AWidget);
|
||||
//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);
|
||||
// Don't raise an exception. Not all operations needs drawable. For example font metrics:
|
||||
// http://bugs.freepascal.org/view.php?id=14035
|
||||
|
Loading…
Reference in New Issue
Block a user