mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Add workaround for macOS leaveEvent() bugs.
On macOS sometimes when mouse leaves the window we don't receive leaveEvent() calls in the nested widgets, like buttons, only for the window itself.
This commit is contained in:
@@ -261,6 +261,14 @@ void MainWindow::resizeEvent(QResizeEvent *e) {
|
||||
updateControlsGeometry();
|
||||
}
|
||||
|
||||
rpl::producer<> MainWindow::leaveEvents() const {
|
||||
return _leaveEvents.events();
|
||||
}
|
||||
|
||||
void MainWindow::leaveEvent(QEvent *e) {
|
||||
_leaveEvents.fire({});
|
||||
}
|
||||
|
||||
void MainWindow::updateControlsGeometry() {
|
||||
auto bodyTop = 0;
|
||||
auto bodyWidth = width();
|
||||
|
Reference in New Issue
Block a user