Add a method to clear transient parent
This commit is contained in:
parent
d1dda0b2ac
commit
99089134e3
4 changed files with 18 additions and 0 deletions
|
|
@ -184,6 +184,17 @@ bool TranslucentWindowsSupported(QPoint globalPosition) {
|
|||
void IgnoreAllActivation(not_null<QWidget*> widget) {
|
||||
}
|
||||
|
||||
void ClearTransientParent(not_null<QWidget*> widget) {
|
||||
#ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||
if (::Platform::IsX11()) {
|
||||
xcb_delete_property(
|
||||
base::Platform::XCB::GetConnectionFromQt(),
|
||||
widget->windowHandle()->winId(),
|
||||
XCB_ATOM_WM_TRANSIENT_FOR);
|
||||
}
|
||||
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||
}
|
||||
|
||||
bool WindowExtentsSupported() {
|
||||
#ifdef DESKTOP_APP_QT_PATCHED
|
||||
if (::Platform::IsWayland()) {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@ inline bool TranslucentWindowsSupported(QPoint globalPosition) {
|
|||
inline void UpdateOverlayed(not_null<QWidget*> widget) {
|
||||
}
|
||||
|
||||
inline void ClearTransientParent(not_null<QWidget*> widget) {
|
||||
}
|
||||
|
||||
inline constexpr bool UseMainQueueGeneric() {
|
||||
return ::Platform::IsMacStoreBuild();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ void UpdateOverlayed(not_null<QWidget*> widget);
|
|||
void ShowOverAll(not_null<QWidget*> widget, bool canFocus = true);
|
||||
void BringToBack(not_null<QWidget*> widget);
|
||||
void IgnoreAllActivation(not_null<QWidget*> widget);
|
||||
void ClearTransientParent(not_null<QWidget*> widget);
|
||||
|
||||
[[nodiscard]] constexpr bool UseMainQueueGeneric();
|
||||
void DrainMainQueue(); // Needed only if UseMainQueueGeneric() is false.
|
||||
|
|
|
|||
|
|
@ -38,6 +38,9 @@ inline void ShowOverAll(not_null<QWidget*> widget, bool canFocus) {
|
|||
inline void BringToBack(not_null<QWidget*> widget) {
|
||||
}
|
||||
|
||||
inline void ClearTransientParent(not_null<QWidget*> widget) {
|
||||
}
|
||||
|
||||
inline constexpr bool UseMainQueueGeneric() {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue