On 2012-08-28 05:07, doh123 wrote:
sorry about the pointer... I was just typing stuff in for the patch
and
screwed that up... no I wasn't using a pointer there, it won't even
compile :-)
for the good news, it seems like my inexperience caused the issue...
the
CFRetain seems to fix the issue as far as I can see, so I doubt its a
problem in CoreGraphics. Its kind of funny the problem never happened
on
10.5, 10.6 and 10.7... guess I got lucky before. I'm guessing from
looking that stops garbage collection from trashing it... and maybe
the
garbage collection with 10.8 is more aggressive.
There is no garbage collection involved. It's just reference counting.
Releasing the last time will free() the memory. You probably got lucky
in the past by having your memory not written over by a new owner.
Thanks for the help... and hopefully you'll add it in to main XQuartz
as
its nice to be able to switch out and then back in to fullscreen
captured
mode easily.
No worries. I'm glad it was easy =)
On Aug 27, 2012, at 11:34 PM, Jeremy Huddleston Sequoia
<jerem...@freedesktop.org> wrote:
On 2012-08-27 21:29, Jeremy Huddleston Sequoia wrote:
+QuartzModeInfoPtr *lastUsedMode; ... + QuartzRandRSetMode(pScreen,
&lastUsedMode, TRUE); That won't work. You should see a warning
from
the compiler telling you that you're passing incompatible pointer
types. Seeing that warning should be a huge red flag that something
is wrong. You probably want this for lastUsedMode: QuartzModeInfo
lastUsedMode;
In reading the body of your email, it looks like you are doing this
correctly, but your patch was just wrong, so I'll assume this is not
the issue. It is possible that the mode is being released out from
under you because you never retained your reference to it. Try doing
something like this when you set your lastUsedMode: if
(lastUsedMode.ref) CFRelease(lastUsedMode.ref); lastUsedMode =
pQuartzScreen->currentMode; CFRetain(lastUsedMode.ref)
--- It also looks like you may be using lastUsedMode uninitialized.
It was probably the case that CG just returned an error in Lion and
is crashing now in ML. That crash is a bug in CG, but it's exposed
by
a bug in your code. --Jeremy On 2012-08-27 18:46, doh123 wrote:
I *think* this is all i did to get it working... but I haven't
tested this. I believe its all the changes I did to get the toggle
working on 10.5 - 10.7 fine. I keep my stuff in patch files
anyways, but all of this wasn't in the same one so I had to go
through and find all the right parts, but If I got it right, it
adds CMD+Opt+A toggle back into fullscreen, just something changed
with 10.8, and I think its something actually with the actual
capturing the display, but I may be wrong... or it may add some
other issues I've never run in to... because I'm not sure why this
was all set to disabled in the first place.
_______________________________________________ Xquartz-dev mailing
list Xquartz-dev@lists.macosforge.org [1]
http://lists.macosforge.org/mailman/listinfo/xquartz-dev [2]
_______________________________________________ Xquartz-dev mailing
list Xquartz-dev@lists.macosforge.org [3]
http://lists.macosforge.org/mailman/listinfo/xquartz-dev [4]
_______________________________________________
Xquartz-dev mailing list
Xquartz-dev@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/xquartz-dev
Links:
------
[1] mailto:Xquartz-dev@lists.macosforge.org
[2] http://lists.macosforge.org/mailman/listinfo/xquartz-dev
[3] mailto:Xquartz-dev@lists.macosforge.org
[4] http://lists.macosforge.org/mailman/listinfo/xquartz-dev
_______________________________________________
Xquartz-dev mailing list
Xquartz-dev@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/xquartz-dev