mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Don't set geometry to OverlayWidget (except macOS).
This commit is contained in:
parent
e81f4e8545
commit
d557e0f2b7
3 changed files with 10 additions and 3 deletions
|
@ -453,6 +453,9 @@ void OverlayWidget::moveToScreen() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void OverlayWidget::updateGeometry() {
|
void OverlayWidget::updateGeometry() {
|
||||||
|
if (!Platform::IsMac()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const auto screen = windowHandle() && windowHandle()->screen()
|
const auto screen = windowHandle() && windowHandle()->screen()
|
||||||
? windowHandle()->screen()
|
? windowHandle()->screen()
|
||||||
: QApplication::primaryScreen();
|
: QApplication::primaryScreen();
|
||||||
|
|
|
@ -55,10 +55,14 @@ class Pip;
|
||||||
#define USE_OPENGL_OVERLAY_WIDGET
|
#define USE_OPENGL_OVERLAY_WIDGET
|
||||||
#endif // Q_OS_MAC && !OS_MAC_OLD
|
#endif // Q_OS_MAC && !OS_MAC_OLD
|
||||||
|
|
||||||
|
struct OverlayParentTraits : Ui::RpWidgetDefaultTraits {
|
||||||
|
static constexpr bool kSetZeroGeometry = false;
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef USE_OPENGL_OVERLAY_WIDGET
|
#ifdef USE_OPENGL_OVERLAY_WIDGET
|
||||||
using OverlayParent = Ui::RpWidgetWrap<QOpenGLWidget>;
|
using OverlayParent = Ui::RpWidgetWrap<QOpenGLWidget, OverlayParentTraits>;
|
||||||
#else // USE_OPENGL_OVERLAY_WIDGET
|
#else // USE_OPENGL_OVERLAY_WIDGET
|
||||||
using OverlayParent = Ui::RpWidget;
|
using OverlayParent = Ui::RpWidgetWrap<QWidget, OverlayParentTraits>;
|
||||||
#endif // USE_OPENGL_OVERLAY_WIDGET
|
#endif // USE_OPENGL_OVERLAY_WIDGET
|
||||||
|
|
||||||
class OverlayWidget final
|
class OverlayWidget final
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit b5fb343d6cea52df8cde00e8e3ca1008c05e4589
|
Subproject commit 120a52c143a9efbcb41d2bf109e82728becf7d6c
|
Loading…
Add table
Reference in a new issue