antonypro / QGoodWindow

QGoodWindow - border less window for Qt 5 and Qt 6
MIT License
506 stars 87 forks source link

[Question]Why is testAttribute called twice #29

Closed bulaia closed 1 year ago

bulaia commented 1 year ago

I'm learning about this great open source library, but I don't understand what it means here.

https://github.com/antonypro/QGoodWindow/blob/d0a17a62ef81a08a28d929e07bfce3e1444674a0/QGoodWindow/QGoodCentralWidget/src/qgoodcentralwidget.cpp#L565-L581

This place has been judged twice if (!widget->mask().isNull() || widget->testAttribute(Qt::WA_TransparentForMouseEvents)) and if (!widget->mask().isNull() && !widget->testAttribute(Qt::WA_TransparentForMouseEvents))

Looking forward for your reply, thank you.

antonypro commented 1 year ago

@bulaia: The twice check is not necessary, it will be fixed in next version.

Thanks for reporting!

antonypro commented 1 year ago

@bulaia: This bug was solved on version 2.3.