Review Request 120931: [OS X] improvements to KWindowSystem

Thomas Lübking thomas.luebking at gmail.com
Sat Nov 15 20:41:08 GMT 2014



> On Nov. 15, 2014, 2:43 nachm., Thomas Lübking wrote:
> > kdeui/windowmanagement/kwindowsystem_mac.cpp, line 418
> > <https://git.reviewboard.kde.org/r/120931/diff/2/?file=328516#file328516line418>
> >
> >     anything that hinders from making kwindowsystem_mac.cpp kwindowsystem_mac.mm directly?
> 
> René J.V. Bertin wrote:
>     Yes, whatever it is that determines whether a header must be processed by moc doesn't pick up that fact in a .mm file.
>     I admit I haven't even tried to figure out where this logic lives because it's obviously incomplete (but also something I don't feel confident to start tweaking with the risk of breaking everything).

set(kwindowsystem_mac_MOC_HDRS kwindowsystem_mac_p.h)
qt4_wrap_cpp(kwindowsystem_mac_MOC_SRCS ${kwindowsystem_mac_MOC_HDRS})

then add ${kwindowsystem_mac_MOC_SRCS} to kdeui_LIB_SRCS


> On Nov. 15, 2014, 2:43 nachm., Thomas Lübking wrote:
> > kdeui/windowmanagement/kwindowsystem_mac.cpp, line 556
> > <https://git.reviewboard.kde.org/r/120931/diff/2/?file=328516#file328516line556>
> >
> >     Does this *really* cut it on OSX?
> >     The function is not supposed to be an extra superfluous wrapper around QWidget, but typically used to control windows IN ANOTHER PROCESS.
> >     
> >     This raises the question whether that's possible on OSX at all.
> >     If not, testing for an in-process window (search toplevels only?) is ok, but the failure should cause a big fat warning to the developer that this code isn't portable.
> 
> René J.V. Bertin wrote:
>     It works for in-process windows, obviously, but no it won't work for windows from another process. I highly doubt that one could meddle with those, and as I must have written in the comments somewhere, you cannot convert the WId to a pointer to an actual window object if it's not owned by ourselves.
>     
>     What exactly are you proposing concerning that big fat warning?
>     Do you know of code that uses this kind of functionality cross-process, apart from kwin and maybe a couple of goodies that aren't relevent outside of a Plasma workspace?

Well, how does the OSX docker etc. raise/activate a window?
Does this imply that activating won't work either for other PID windows? (The comments actually seem to suggest so)
In case: why mess with the cocoa API itfp? You could just as well wrap around Qt (w/ a //TODO or similar)

> What exactly are you proposing concerning that big fat warning?
qWarning("BlahFooBar does not work on OSX, please fix your stuff");
if (m_DebugClient)
   abort();
   
m_DebugClient could be set in a header inline, depending on whether QT_DEBUG is defined (or QT_NO_DEBUG is not defined)


- Thomas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120931/#review70399
-----------------------------------------------------------


On Nov. 14, 2014, 11:04 nachm., René J.V. Bertin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120931/
> -----------------------------------------------------------
> 
> (Updated Nov. 14, 2014, 11:04 nachm.)
> 
> 
> Review request for KDE Software on Mac OS X and kdelibs.
> 
> 
> Repository: kdelibs
> 
> 
> Description
> -------
> 
> This is an attempt to improve the Mac-specific implementation of the `KWindowSystem` class.
> For convenience and future-proofness (and also because I like the language) I converted `kwindowsystem_mac.cpp` to ObjC++, i.e. `kwindowsystem_mac.mm`, and added the AppKit framework in the CMakeFile.
> 
> Much of the code in this file is hardly better than gentle hacking, but that probably concerns the functions that are of least interest on a platform where KDE doesn't do session management.
> 
> I should probably update the "not yet implemented" debug statements (to "unsupported"), and I might have another look at kwindowinfo_mac.cpp too.
> 
> 
> Diffs
> -----
> 
>   kdeui/CMakeLists.txt 1454790 
>   kdeui/tests/kwindowtest.cpp b4012d7 
>   kdeui/windowmanagement/kwindowsystem_mac.cpp 4200237 
>   kdeui/windowmanagement/kwindowsystem_mac_p.h PRE-CREATION 
>   kdeui/windowmanagement/kwindowsystem_macobjc.mm PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/120931/diff/
> 
> 
> Testing
> -------
> 
> On OS X 10.6.8, mostly with the updated kwindowtest utility (which calls KWindowSystem functions when clicking the Open button in its toolbar).
> Also tested on Mac OS X 10.9.4 rebuilding kdelibs from scratch.
> 
> 
> Thanks,
> 
> René J.V. Bertin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20141115/a50c1321/attachment.htm>


More information about the kde-core-devel mailing list