[Lazarus] How to create a non focusable form?

Zeljko zeljko at holobit.net
Wed Oct 28 14:12:16 CET 2015



On 10/28/2015 01:06 PM, Gabor Boros wrote:
> 2015.10.28. 11:51 keltezéssel, Zeljko írta:
>> Ok, then go to QtWSForms, TQtWSCustomForms.UpdateWindowFlags and comment
>> if csNoStdEvents ..... leave only
>> Flags := Flags or QtX11BypassWindowManagerHint;
>>
>> in this case form will not take focus in any case, but must see what
>> happens with parenting (button is not visible because of this param I
>> guess).
>
> Commented out "if csNoStdEvents..." line. Button not visible on form
> with out without csNoStdEvents in ControlStyle.

Please check with attached patch (same name as previous one). Seem that 
our C bindings does not have all attributes translated since they did 
not exist in Qt-4.5, but sometime later. I've added strict X11 attribute 
and now it does not steal activation or focus, even if clicked with 
mouse (tested with your example with button).

zeljko

-------------- next part --------------
A non-text attachment was scrubbed...
Name: qt_activation_fix.diff
Type: text/x-patch
Size: 987 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20151028/8e65fdd9/attachment-0003.bin>


More information about the Lazarus mailing list