[Lazarus] Taskbar button for modal forms

cobines cobines at gmail.com
Fri Dec 24 17:33:34 CET 2010


2010/12/24 Graeme Geldenhuys <graemeg.lists at gmail.com>:
> @to the original poster of this thread
> What version of GTK2 are you using?

I have GTK 2.23.2.

I checked some GTK2 non-LCL applications, whenever modal form is shown
no additional taskbar button is created.

But could it be "fixed" in LCLGTK2, at least for the newer GTK2
versions? Same code that causes taskbar button not to be created for
ShowInTaskbar=stNever could be used to suppress it when showing the
form as modal. Like this:

Index: gtk2winapi.inc
===================================================================
--- gtk2winapi.inc	(wersja 28817)
+++ gtk2winapi.inc	(kopia robocza)
@@ -8186,6 +8186,8 @@
       {$IFDEF DebugGDKTraps}
       BeginGDKErrorTrap;
       {$ENDIF}
+      if fsModal in AForm.FormState then
+        SetGtkWindowShowInTaskbar(PGtkWindow(hwnd), False);
       gdk_window_show(GdkWindow);
       gdk_window_raise(GdkWindow);
       {$IFDEF DebugGDKTraps}


--
cobines




More information about the Lazarus mailing list