Has anyone successfully used gtk_widget_freeze_child_notify() to temporarily prevent a control (such as e.g. a TextArea) from redrawing?
I have been able to fix a visual annoyance for a TextArea using the freeze() and unfreeze() methods posted by on Windows. I’m looking for a way to achieve the same on Linux (particularly Ubuntu).
I updated freeze() and unfreeze() as follows, but it doesn’t seem to make a difference:
[code]Public Sub Freeze(extends w as TextArea)
#if TargetWindows
Const WM_SETREDRAW = &hB
call SendMessage( w.Handle, WM_SETREDRAW, 0, 0 )
#elseif TargetLinux //https://developer.gnome.org/gtk3/stable/GtkWidget.html
Soft Declare Sub gtk_widget_freeze_child_notify Lib “gtk” ( hwnd as integer )
if System.IsFunctionAvailable(“gtk_widget_freeze_child_notify”, “gtk”) then
gtk_widget_freeze_child_notify(w.Handle)
end if
#else
#Pragma Unused w
#EndIf
End Sub
Public Sub UnFreeze(extends w as TextArea)
#if TargetWindows
Const WM_SETREDRAW = &hB
call SendMessage( w.Handle, WM_SETREDRAW, 1, 0 )
w.Refresh
#elseif TargetLinux // https://developer.gnome.org/gtk3/stable/GtkWidget.html
Soft Declare Sub gtk_widget_thaw_child_notify Lib “gtk” ( hwnd as integer )
if System.IsFunctionAvailable(“gtk_widget_thaw_child_notify”, “gtk”) then
gtk_widget_thaw_child_notify(w.Handle)
w.Refresh
end if
#else
#Pragma Unused w
#EndIf
End Sub
[/code]
I have confirmed that gtk_widget_freeze_child_notify() and gtk_widget_thaw_child_notify() are being executed. However, unlike on Windows, the textArea on Ubuntu still happily redraws, even after gtk_widget_freeze_child_notify() was called.
Any help with this would be greatly appreciated.