Make polkit dialog movable

pull/15/head
reionwong 5 years ago
parent 34f87f164a
commit 9214b478ca

@ -145,7 +145,8 @@ Window {
z: -1 z: -1
anchors.fill: parent anchors.fill: parent
color: _closeBtnArea.pressed ? pressedColor : _closeBtnArea.containsMouse ? hoveredColor : "transparent" color: "transparent"
// color: _closeBtnArea.pressed ? pressedColor : _closeBtnArea.containsMouse ? hoveredColor : "transparent"
radius: height / 2 radius: height / 2
} }
@ -153,6 +154,7 @@ Window {
id: _closeBtnArea id: _closeBtnArea
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
onEntered: timer.stop()
onClicked: { onClicked: {
notificationsModel.close(model.notificationId) notificationsModel.close(model.notificationId)
} }

@ -80,6 +80,9 @@ Item {
popup.y = y popup.y = y
y += popup.height + (popup.height > 0 ? popupSpacing : 0) y += popup.height + (popup.height > 0 ? popupSpacing : 0)
// Horizontal
popup.x = screenRect.x + (screenRect.width - popup.width) / 2
// don't let notifications take more than popupMaximumScreenFill of the screen // don't let notifications take more than popupMaximumScreenFill of the screen
var visible = true var visible = true
if (i > 0) { // however always show at least one popup if (i > 0) { // however always show at least one popup

@ -16,6 +16,17 @@ Item {
color: FishUI.Theme.secondBackgroundColor color: FishUI.Theme.secondBackgroundColor
} }
DragHandler {
target: null
acceptedDevices: PointerDevice.GenericPointer
grabPermissions: TapHandler.CanTakeOverFromAnything
onActiveChanged: if (active) { windowHelper.startSystemMove(rootWindow) }
}
FishUI.WindowHelper {
id: windowHelper
}
FishUI.WindowShadow { FishUI.WindowShadow {
view: rootWindow view: rootWindow
geometry: Qt.rect(root.x, root.y, root.width, root.height) geometry: Qt.rect(root.x, root.y, root.width, root.height)

@ -22,7 +22,7 @@
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
putenv((char *)"SESSION_MANAGER="); // putenv((char *)"SESSION_MANAGER=");
// force xcb QPA plugin as session manager server is very X11 specific. // force xcb QPA plugin as session manager server is very X11 specific.
qputenv("QT_QPA_PLATFORM", QByteArrayLiteral("xcb")); qputenv("QT_QPA_PLATFORM", QByteArrayLiteral("xcb"));

@ -75,26 +75,13 @@ void ProcessManager::logout()
QDBusConnection::sessionBus()); QDBusConnection::sessionBus());
if (kwinIface.isValid()) { if (kwinIface.isValid()) {
// kwinIface.call("aboutToSaveSession", "cutefish"); kwinIface.call("aboutToSaveSession", "cutefish");
kwinIface.call("setState", uint(2)); // Quit kwinIface.call("setState", uint(2)); // Quit
} }
QMapIterator<QString, QProcess *> i(m_systemProcess); QProcess s;
s.start("killall", QStringList() << "kglobalaccel5");
while (i.hasNext()) { s.waitForFinished(-1);
i.next();
QProcess *p = i.value();
p->terminate();
}
i.toFront();
while (i.hasNext()) {
i.next();
QProcess *p = i.value();
if (p->state() != QProcess::NotRunning && !p->waitForFinished(2000)) {
p->kill();
}
}
QDBusInterface iface("org.freedesktop.login1", QDBusInterface iface("org.freedesktop.login1",
"/org/freedesktop/login1/session/self", "/org/freedesktop/login1/session/self",

Loading…
Cancel
Save