[PATCH] Qt 4.4 - Fix alien widgets in Dolphin
Robert Knight
robertknight at gmail.com
Sun Feb 17 22:03:10 GMT 2008
Hi David,
The attached patch attempts to fix this inside KIO by taking the top
level window associated with the passed widget in
JobUiDelegate::setWindow().
The patch does change the semantics of the API slightly since it
becomes possible that JobUiDelegate::window() does not return the same
value passed to JobUiDelegate::setWindow().
QWidget does provide an alternative, effectiveWinId() which goes up
the widget chain and finds the first widget that does have an X11
window associated with it and returns the id of that. The setWindow()
change is simpler since it only occurs in one place.
Regards,
Robert.
On 15/02/2008, David Faure <faure at kde.org> wrote:
> On Thursday 14 February 2008, Robert Knight wrote:
> > Since the actual call to winId() happens deep inside KIO, perhaps it
> > would be better to put a fix there and only ever get winIds for
> > top-level widgets to prevent applications doing this accidentally.
> > Thoughts?
>
> Yes. We take the winId in several places in KIO, but in every case, the toplevel would
> be fine, it's only about associating dialogs from other processes (e.g. the cookie dialog)
> with the toplevel window that requested the KIO operation.
>
> --
> David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
> Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs_kio_jobuidelegate_always_use_top_level_window.patch
Type: text/x-patch
Size: 1159 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080217/b459e459/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs_kio_krun_always_use_top_level_window.patch
Type: text/x-patch
Size: 508 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080217/b459e459/attachment-0001.bin>
More information about the kde-core-devel
mailing list