mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-30 01:08:02 +00:00
Implement possibility to hide taskbar icon on Linux
This commit is contained in:
@@ -502,6 +502,25 @@ bool UnsetXCBFrameExtents(QWindow *window) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool XCBSkipTaskbarSupported() {
|
||||
const auto connection = base::Platform::XCB::GetConnectionFromQt();
|
||||
if (!connection) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto skipTaskbarAtom = base::Platform::XCB::GetAtom(
|
||||
connection,
|
||||
"_NET_WM_STATE_SKIP_TASKBAR");
|
||||
|
||||
if (!skipTaskbarAtom.has_value()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ranges::contains(
|
||||
base::Platform::XCB::GetWMSupported(connection),
|
||||
*skipTaskbarAtom);
|
||||
}
|
||||
|
||||
Window::Control GtkKeywordToWindowControl(const QString &keyword) {
|
||||
if (keyword == qstr("minimize")) {
|
||||
return Window::Control::Minimize;
|
||||
@@ -769,6 +788,10 @@ bool TrayIconSupported() {
|
||||
: false;
|
||||
}
|
||||
|
||||
bool SkipTaskbarSupported() {
|
||||
return !IsWayland() && XCBSkipTaskbarSupported();
|
||||
}
|
||||
|
||||
bool StartSystemMove(QWindow *window) {
|
||||
if (IsWayland()) {
|
||||
return StartWaylandMove(window);
|
||||
|
||||
Reference in New Issue
Block a user