Review Request 126291: initial implementation of a platform plugin for OS X (WIP)

René J.V. Bertin rjvbertin at gmail.com
Thu Feb 25 22:10:07 UTC 2016



> On Feb. 25, 2016, 8:26 a.m., Martin Gräßlin wrote:
> > I don't like the introduction of the SCRAPBOOK. The repository is not the place for dead and old code. That's what git already supports with keeping the whole history.
> > 
> > We have some autotests for kwindowsystem. Could you try whether the tests work also on OSX?

I agree to a certain extent. Git's history feature isn't exactly comparable to a history book in which you can go look around to see if at some point maybe someone contributed some code that was never finished. At the very least you'd need to leave comments in the code that "here used to be some junk DNA that maybe could have led to a whole better world" (and in that case, why not just leave in the code #ifdeffed-out ...)

As to the autotests: they're built only when `X11_FOUND`. Are you in fact asking me to port them?


> On Feb. 25, 2016, 8:26 a.m., Martin Gräßlin wrote:
> > src/kwindowsystem.cpp, lines 465-467
> > <https://git.reviewboard.kde.org/r/126291/diff/4/?file=445231#file445231line465>
> >
> >     I would prefer to not introduce new platform specific code in the shared part.
> >     
> >     The idea you have here is right, but it's not OSX specific, the same applies for e.g. Wayland

I agree. This function should probably be moved to the plugin. That's just not a responsability I'd love to take for X11 and Wayland, otherwise I'd have implemented this in my patch.

Can you or one of the other KWindowSystem devs take care of this on the current supported platforms, so that I can adapt this patch?


> On Feb. 25, 2016, 8:26 a.m., Martin Gräßlin wrote:
> > src/platforms/osx/plugin.h, line 2
> > <https://git.reviewboard.kde.org/r/126291/diff/4/?file=445244#file445244line2>
> >
> >     I'm not the author of this file

Actually, you apparently are the author of the template I used to create this file :)

(It's an oversight I didn't add myself though)


- René J.V.


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


On Feb. 23, 2016, 10:54 p.m., René J.V. Bertin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126291/
> -----------------------------------------------------------
> 
> (Updated Feb. 23, 2016, 10:54 p.m.)
> 
> 
> Review request for KDE Software on Mac OS X and KDE Frameworks.
> 
> 
> Repository: kwindowsystem
> 
> 
> Description
> -------
> 
> KWindowSystem has been lacking a platform plugin for OS X. This RR presents a "backport" of the modified KDE4 KWindowSystem implementation that has been used in the MacPorts kdelibs4 port for the last 2 or 3 (or more) years.
> 
> I have made some initial steps to remove deprecated Carbon API calls, but this is clearly a work in progress.
> 
> Open questions include
> - is there any justification to run an event handler (or Cocoa observer) to keep track of running applications, possibly even listing all their open windows?
> - is there any use for the Qt event listener framework (cf. the NETEventFilter in the X11 plugin)? I haven't yet had time to try to figure out what this "could be good for", and am very open to suggestions in this departments.
> - one application for such an event filter would be a listener that catches the opening and closing of all windows by the running process, and keeps track of their `WId`s. A new method could then be added (to `KWindowInfo`?) to distinguish `WId`s created by the running application from "foreign" ones (useful also on Wayland and MS Windows).
> 
> `KWindowSystem::setMainWindow` should become a front for payload provided by the plugins. I'll leave that to the regular/official maintainer(s) of this framework.
> 
> This code could probably do with *lots* of comments; I'll try to add them as questions about this or that bit of code arise.
> 
> 
> Diffs
> -----
> 
>   src/debug_p.h 5ef8996 
>   src/debug_p.cpp 72abfb7 
>   src/kwindowsystem.cpp 407a67d 
>   src/platforms/osx/CMakeLists.txt 4fc3347 
>   src/platforms/osx/SCRAPBOOK PRE-CREATION 
>   src/platforms/osx/cocoa.json PRE-CREATION 
>   src/platforms/osx/kkeyserver.cpp 3ddb921 
>   src/platforms/osx/kwindowinfo.cpp e8555bb 
>   src/platforms/osx/kwindowinfo.mm PRE-CREATION 
>   src/platforms/osx/kwindowinfo_mac_p.h c8f307e 
>   src/platforms/osx/kwindowinfo_p_cocoa.h PRE-CREATION 
>   src/platforms/osx/kwindowsystem.cpp 1758829 
>   src/platforms/osx/kwindowsystem_mac_p.h PRE-CREATION 
>   src/platforms/osx/kwindowsystem_macobjc.mm PRE-CREATION 
>   src/platforms/osx/kwindowsystem_p_cocoa.h PRE-CREATION 
>   src/platforms/osx/plugin.h PRE-CREATION 
>   src/platforms/osx/plugin.cpp PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/126291/diff/
> 
> 
> Testing
> -------
> 
> On OS X 10.9.5 with Qt 5.5.1 and frameworks 5.16.0 .
> 
> 
> Thanks,
> 
> René J.V. Bertin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160225/4555c2f6/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list