mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Use Platform::IsWayland in linux_gdk_helper
This commit is contained in:
parent
596c7892c7
commit
0ff6c555b1
1 changed files with 13 additions and 10 deletions
|
@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "platform/linux/linux_gdk_helper.h"
|
#include "platform/linux/linux_gdk_helper.h"
|
||||||
|
|
||||||
#include "platform/linux/linux_libs.h"
|
#include "platform/linux/linux_libs.h"
|
||||||
|
#include "base/platform/base_platform_info.h"
|
||||||
#include "base/platform/linux/base_xcb_utilities_linux.h"
|
#include "base/platform/linux/base_xcb_utilities_linux.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -78,17 +79,19 @@ bool GdkHelperLoaded() {
|
||||||
|
|
||||||
void XSetTransientForHint(GdkWindow *window, quintptr winId) {
|
void XSetTransientForHint(GdkWindow *window, quintptr winId) {
|
||||||
if (gdk_helper_loaded == GtkLoaded::Gtk2) {
|
if (gdk_helper_loaded == GtkLoaded::Gtk2) {
|
||||||
xcb_change_property(
|
if (!IsWayland()) {
|
||||||
base::Platform::XCB::GetConnectionFromQt(),
|
xcb_change_property(
|
||||||
XCB_PROP_MODE_REPLACE,
|
base::Platform::XCB::GetConnectionFromQt(),
|
||||||
gdk_x11_drawable_get_xid(window),
|
XCB_PROP_MODE_REPLACE,
|
||||||
XCB_ATOM_WM_TRANSIENT_FOR,
|
gdk_x11_drawable_get_xid(window),
|
||||||
XCB_ATOM_WINDOW,
|
XCB_ATOM_WM_TRANSIENT_FOR,
|
||||||
32,
|
XCB_ATOM_WINDOW,
|
||||||
1,
|
32,
|
||||||
&winId);
|
1,
|
||||||
|
&winId);
|
||||||
|
}
|
||||||
} else if (gdk_helper_loaded == GtkLoaded::Gtk3) {
|
} else if (gdk_helper_loaded == GtkLoaded::Gtk3) {
|
||||||
if (gdk_is_x11_window_check(window)) {
|
if (!IsWayland() && gdk_is_x11_window_check(window)) {
|
||||||
xcb_change_property(
|
xcb_change_property(
|
||||||
base::Platform::XCB::GetConnectionFromQt(),
|
base::Platform::XCB::GetConnectionFromQt(),
|
||||||
XCB_PROP_MODE_REPLACE,
|
XCB_PROP_MODE_REPLACE,
|
||||||
|
|
Loading…
Add table
Reference in a new issue