Re: [Interest] Bug in QCodoaWindow?

2020-08-28 Thread Tor Arne Vestbø
> On 27 Aug 2020, at 23:36, j...@wavemetrics.com wrote: > > I was primed to find something wrong: I've been getting what as far as I can > tell are bad window state change events telling me that a window is maximized > when it isn't. Plays dicky with certain parts of my code! Do you have a

Re: [Interest] Bug in QCodoaWindow?

2020-08-27 Thread john
Thanks, Andy. You're quite right. Now I'm trying to think about troubles I've had that require parens, and can't remember... Maybe I was mixing bitwise & and bitwise | (or). And certainly it's easy to write buggy code mixing && and ||. I was primed to find something wrong: I've been getting

Re: [Interest] Bug in QCodoaWindow?

2020-08-27 Thread Andy
Bitwise "&" has precedence over logical "&&", so I think this is alright. https://en.cppreference.com/w/cpp/language/operator_precedence (Regardless I would always use parens in cases like this to make it easier for humans reading the code.) --- Andy Maloney // https://asmaloney.com twitter ~

[Interest] Bug in QCodoaWindow?

2020-08-27 Thread John Weeks
Isn't this a bug? bool QCocoaWindow::isTransitioningToFullScreen() const { NSWindow *window = m_view.window; return window.styleMask & NSWindowStyleMaskFullScreen && !window.qt_fullScreen; } Seems like the bitwise & needs parens. This is from Qt 5.12.9. Haven't checked Qt 5.15. -John