Skip to content

Commit

Permalink
#22: Warning about X11
Browse files Browse the repository at this point in the history
  • Loading branch information
antroids committed Mar 22, 2024
1 parent 3238abf commit 9dbe37d
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
1 change: 1 addition & 0 deletions package/contents/ui/ActiveTasksModel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ TaskManager.TasksModel {
onCountChanged: updateActiveTaskIndex()
sortMode: TaskManager.TasksModel.SortLastActivated
groupMode: TaskManager.TasksModel.GroupDisabled
Component.onCompleted: updateActiveTaskIndex()

virtualDesktopInfo: TaskManager.VirtualDesktopInfo {
}
Expand Down
28 changes: 28 additions & 0 deletions package/contents/ui/config/ConfigBehavior.qml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ KCM.SimpleKCM {
}
}

Kirigami.InlineMessage {
anchors.left: parent.left
anchors.right: parent.right
text: i18n("Some functionality is unsupported or can work unstable in X11 sessions.")
type: Kirigami.MessageType.Error
visible: !Utils.isWayland()
}

RowLayout {
Kirigami.FormData.label: i18n("Active task source:")

Expand Down Expand Up @@ -141,14 +149,34 @@ KCM.SimpleKCM {
to: 512
}

Kirigami.InlineMessage {
anchors.left: parent.left
anchors.right: parent.right
text: i18n("Window Move action is incompatible with Mouse Drag in X11 sessions.")
type: Kirigami.MessageType.Error
visible: !Utils.isWayland() && leftButtonDragAction.currentValue == "Window Move"
}

KWinShortcutComboBox {
id: leftButtonDragAction

label: i18n("Left button drag:")
enabled: windowTitleDragEnabled.checked
initialValue: cfg_widgetMouseAreaLeftDragAction
onActivated: cfg_widgetMouseAreaLeftDragAction = currentValue
}

Kirigami.InlineMessage {
anchors.left: parent.left
anchors.right: parent.right
text: i18n("Window Move action is incompatible with Mouse Drag in X11 sessions.")
type: Kirigami.MessageType.Error
visible: !Utils.isWayland() && middleButtonDragAction.currentValue == "Window Move"
}

KWinShortcutComboBox {
id: middleButtonDragAction

label: i18n("Middle button drag:")
enabled: windowTitleDragEnabled.checked
initialValue: cfg_widgetMouseAreaMiddleDragAction
Expand Down
4 changes: 4 additions & 0 deletions package/contents/ui/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

function isWayland() {
const isWaylandPlugin = Qt.platform.pluginName == "wayland";
return isWaylandPlugin;
}

function copyLayoutConstraint(from, to) {
Object.assign(to.Layout, {
Expand Down
2 changes: 1 addition & 1 deletion package/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"Id": "com.github.antroids.application-title-bar",
"Name": "Application Title Bar",
"License": "GPL-3.0+",
"Version": "0.4.2",
"Version": "0.4.3",
"Website": "https://github.com/antroids/application-title-bar",
"FormFactors": [
"desktop"
Expand Down

0 comments on commit 9dbe37d

Please sign in to comment.