We found a solution to that bug. The Cocoa window itself isn't set to non resizeable.
If you do this, everything works as expected.
class MainWindow : public QMainWindow
{
public:
explicit MainWindow(QWidget *parent = nullptr) :
QMainWindow(parent)
{
//this will get rid of the size grip widget showing
setFixedSize(500, 500);
}
void mousePressEvent(QMouseEvent *) override
{
std::cout<<"mouse pressed"<<std::endl;
}
};
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
NSWindow* window = [(NSView*)w.window()->winId() window];
//IMTPORTANT. Otherwise the lower right mouse events will not be passed on correctly by cocoa
window.styleMask &= ~NSWindowStyleMaskResizable;
w.show();
return a.exec();
}