So, the following diff allows us to enter X11 from another application using expose. We are still limited to just the first X11 window, however... but I believe this solves the "from another application" half of that issue. I haven't committed the change because I'd like some feedback from someone who actually understands Quartz a bit more than me. I don't understand how SetFrontProcess, X11ApplicationSetFrontProcess, etc all inter-relate... from what I'd guess, SetFrontProcess(&psn) causes an event to be placed in the event queue for the process associated with that psn. Thus this bit of code really scares me because it's just begging to become an infinite loop at some point perhaps when we fix the argv[0] workaround. Also, is this really a side-effect of our argv[0] trickery as I suspect it is or does this change just fix the symptom with a quick- fix and actually help reveal where the real problem is? --Jeremy @@ -714,6 +715,10 @@ void X11ApplicationSetWindowMenuCheck (int idx) { void X11ApplicationSetFrontProcess (void) { message_kit_thread (@selector (set_front_process:), nil); + + /* Hackery needed due to argv[0] hackery */ + ProcessSerialNumber psn = { 0, kCurrentProcess }; + SetFrontProcess(&psn); } void X11ApplicationSetCanQuit (int state) {
participants (1)
-
Jeremy Huddleston