[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: =?utf-8?Q?=E7=AD=94=E5=A4=8D:_PolicyKit1-KDE_AuthDialog_could_not_shown_a?= =?utf-8?Q?s_TOP=5FLEVEL?
From: Jeff Bai <jeffbaichina () gmail ! com>
Date: 2014-06-01 7:23:37
Message-ID: 538ad4c2.82e6440a.2796.3486 () mx ! google ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
And as I see it, I found it kind of silly to hack in a KDE aspect.
-----原始邮件-----
发件人: "Leslie Zhai" <xiangzhai83@gmail.com>
发送时间: 2014/6/1 15:17
收件人: "Thomas Lübking" <thomas.luebking@gmail.com>; "kde-devel@kde.org" \
<kde-devel@kde.org> 抄送: "Daniel Nicoletti" <dantti12@gmail.com>; \
"jeffbaichina@members.fsf.org" <jeffbaichina@members.fsf.org> 主题: Re: \
PolicyKit1-KDE AuthDialog could not shown as TOP_LEVEL
Hi Thomas,
Thanks for your reply :)
1. it is NOT a bug about Apper or QJade.
Because Apper and QJade uses PackageKit-Qt, a Qt bindings for
PackageKit. When it calls installPackage function of PackageKit-Qt,
there is pk_transaction_obtain_authorization function in PackageKit to
call PolicyKit relative dbus async APIs such as
polkit_authority_check_authorization.
the process shown as below:
Apper install package -> PackageKit-Qt call installPackage -> PackageKit
do PolicyKit authorization -> polkitd -> Polkit-Qt -> Polkit-KDE
so there is NO Apper assoicate WID for AuthDialog constructor.
2. KWindowSystem::forceActiveWindow sometimes worked BUT ...
Sometimes it FAILED to force active window to act like modal one, for
example, Apper or QJade covered the Polkit-KDE AuthDialog window, but I
simply setWindowFlags for AuthDialog to force it as _NET_WM_STATE_ABOVE,
I experienced it :)
https://github.com/xiangzhai/grt/blob/master/GRTExamples/ClassificationModulesExamples/X11DTWExample/x11.cpp#L102 \
Regards,
Leslie Zhai <xiang.zhai@i-soft.com.cn>
On 2014年05月30日 21:49, Thomas Lübking wrote:
> On Freitag, 30. Mai 2014 05:09:58 CEST, Leslie Zhai wrote:
> > Hi KDE developers,
> >
> > My colleage reported a bug to me, it is about PolicyKit1-KDE AuthDialog
> > UI behavior issue, the AuthDialog could not show as TOP_LEVEL
>
> That's called "_NET_WM_STATE_ABOVE" - "toplevel" usually refers to a
> window with the root window as parent drawable.
>
> > installing some App via Qt frontend of PackageKit, for example, Apper or
> > QJade https://github.com/AOSC-Dev/QJade
>
> Seems an apper bug.
> You want to pass the Apper window WId as last parameter to the
> AuthDialog() constructor.
>
> This will make the AuthDialog modal (and transient) for that window.
>
> The only problem occurs if you have no window to assiciate the
> AuthDialog with. In this case you may wish to enforce activation (see
> KWindowSystem::forceActiveWindow()) which is legit, if the dialog
> appears as result of a direct user interaction (eg. with some systray
> icon etc.)
>
> Cheers,
> Thomas
[Attachment #5 (unknown)]
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type></HEAD>
<BODY>
<DIV>
<DIV style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif">And as I see it, I \
found it kind of silly to hack in a KDE aspect.</DIV></DIV> <DIV dir=ltr>
<HR>
<SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: \
bold">发件人: </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: \
Calibri,sans-serif"><A href="mailto:xiangzhai83@gmail.com">Leslie \
Zhai</A></SPAN><BR><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; \
FONT-WEIGHT: bold">发送时间: </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: \
Calibri,sans-serif">2014/6/1 15:17</SPAN><BR><SPAN style="FONT-SIZE: 11pt; \
FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">收件人: </SPAN><SPAN \
style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif"><A \
href="mailto:thomas.luebking@gmail.com">Thomas Lübking</A>; <A \
href="mailto:kde-devel@kde.org">kde-devel@kde.org</A></SPAN><BR><SPAN \
style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">抄送: \
</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif"><A \
href="mailto:dantti12@gmail.com">Daniel Nicoletti</A>; <A \
href="mailto:jeffbaichina@members.fsf.org">jeffbaichina@members.fsf.org</A></SPAN><BR><SPAN \
style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">主题: \
</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif">Re: \
PolicyKit1-KDE AuthDialog could not shown as TOP_LEVEL</SPAN><BR><BR></DIV>Hi \
Thomas,<BR><BR>Thanks for your reply :)<BR><BR>1. it is NOT a bug about Apper or \
QJade.<BR><BR>Because Apper and QJade uses PackageKit-Qt, a Qt bindings for \
<BR>PackageKit. When it calls installPackage function of PackageKit-Qt, <BR>there is \
pk_transaction_obtain_authorization function in PackageKit to <BR>call PolicyKit \
relative dbus async APIs such as <BR>polkit_authority_check_authorization.<BR>the \
process shown as below:<BR><BR>Apper install package -> PackageKit-Qt call \
installPackage -> PackageKit <BR>do PolicyKit authorization -> polkitd -> \
Polkit-Qt -> Polkit-KDE<BR><BR>so there is NO Apper assoicate WID for AuthDialog \
constructor.<BR><BR>2. KWindowSystem::forceActiveWindow sometimes worked BUT \
...<BR><BR>Sometimes it FAILED to force active window to act like modal one, for \
<BR>example, Apper or QJade covered the Polkit-KDE AuthDialog window, but I \
<BR>simply setWindowFlags for AuthDialog to force it as _NET_WM_STATE_ABOVE, <BR>I \
experienced it :) <BR>https://github.com/xiangzhai/grt/blob/master/GRTExamples/ClassificationModulesExamples/X11DTWExample/x11.cpp#L102 \
<BR><BR><BR><BR>Regards,<BR>Leslie Zhai \
<xiang.zhai@i-soft.com.cn><BR><BR><BR>On 2014年05月30日 21:49, Thomas \
Lübking wrote:<BR>> On Freitag, 30. Mai 2014 05:09:58 CEST, Leslie Zhai \
wrote:<BR>>> Hi KDE developers,<BR>>><BR>>> My colleage reported a \
bug to me, it is about PolicyKit1-KDE AuthDialog<BR>>> UI behavior issue, the \
AuthDialog could not show as TOP_LEVEL<BR>><BR>> That's called \
"_NET_WM_STATE_ABOVE" - "toplevel" usually refers to a <BR>> window with the root \
window as parent drawable.<BR>><BR>>> installing some App via Qt frontend of \
PackageKit, for example, Apper or<BR>>> QJade \
https://github.com/AOSC-Dev/QJade<BR>><BR>> Seems an apper bug.<BR>> You \
want to pass the Apper window WId as last parameter to the <BR>> AuthDialog() \
constructor.<BR>><BR>> This will make the AuthDialog modal (and transient) for \
that window.<BR>><BR>> The only problem occurs if you have no window to \
assiciate the <BR>> AuthDialog with. In this case you may wish to enforce \
activation (see <BR>> KWindowSystem::forceActiveWindow()) which is legit, if the \
dialog <BR>> appears as result of a direct user interaction (eg. with some systray \
<BR>> icon etc.)<BR>><BR>> Cheers,<BR>> Thomas<BR><BR></BODY></HTML>
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic