Re: Problems when putting a window between desktop and desktop icons
On Mon, Oct 27, 2008 at 21:45, Karl Goiser [EMAIL PROTECTED] wrote: Dear Markus and others, This is a problem that I have had with an application of mine, iCalViewer, which displays a window on the desktop. What happens is that you can find a window level which draws the window under the desktop icons and over the desktop itself. However, at that level, that window captures the mouse events as if it was _over_ the desktop icons. My only solution was to disable mouse interaction with my window. I raised this as a bug with Apple, bug number 3521992 on 5 January, 2004 - coming up to 5 years ago! Regards, Karl Thanks for your reply, good to hear it's not just me, on the other hand not so good because it obviously can't be done :) Time to come up with an entirely different solution then. -- Markus Amalthea Magnuson http://konstochvanligasaker.se http://nattlek.se Life... is like a grapefruit. It's orange and squishy, and has a few pips in it, and some folks have half a one for breakfast. – Douglas Adams ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Problems when putting a window between desktop and desktop icons
On 28.10.2008, at 08:27, Markus Amalthea Magnuson wrote: On Mon, Oct 27, 2008 at 21:45, Karl Goiser [EMAIL PROTECTED] wrote: Dear Markus and others, This is a problem that I have had with an application of mine, iCalViewer, which displays a window on the desktop. What happens is that you can find a window level which draws the window under the desktop icons and over the desktop itself. However, at that level, that window captures the mouse events as if it was _over_ the desktop icons. My only solution was to disable mouse interaction with my window. I raised this as a bug with Apple, bug number 3521992 on 5 January, 2004 - coming up to 5 years ago! Regards, Karl Thanks for your reply, good to hear it's not just me, on the other hand not so good because it obviously can't be done :) Hm, you could try to detect mouse events for the icons yourself and if such an event is detected repost it to the Finder using some low level event posting in Core Graphics. I’m not sure though whether you can post events for a specific app or even for a specific window. Or (maybe easier) turn it around: set your window to ignore mouse events and use a low level event tap to catch those mouse events you are interested in. Best luck! Kai Time to come up with an entirely different solution then. -- Markus Amalthea Magnuson http://konstochvanligasaker.se http://nattlek.se Life... is like a grapefruit. It's orange and squishy, and has a few pips in it, and some folks have half a one for breakfast. – Douglas Adams ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/kai%40granus.net This email sent to [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Problems when putting a window between desktop and desktop icons
Dear Markus and others, This is a problem that I have had with an application of mine, iCalViewer, which displays a window on the desktop. What happens is that you can find a window level which draws the window under the desktop icons and over the desktop itself. However, at that level, that window captures the mouse events as if it was _over_ the desktop icons. My only solution was to disable mouse interaction with my window. I raised this as a bug with Apple, bug number 3521992 on 5 January, 2004 - coming up to 5 years ago! Regards, Karl On 24/10/2008, at 4:48 AM, Markus Amalthea Magnuson wrote: On Thu, Oct 23, 2008 at 19:26, Matt Neuburg [EMAIL PROTECTED] wrote: Hello, I am trying to put a window above the desktop but below the desktop icons. I have achieved this by using the following code (in my own subclass of NSWindow): [self setLevel:kCGDesktopIconWindowLevel - 1]; I think what you want to say is CGWindowLevelForKey(kCGDesktopWindowLevelKey). This should be more robust than manipulating the level value directly. Thanks for the tip! However, that doesn't really solve my problem, which I am beginning to think is a bug on Apple's behalf. If anyone is interested in some sample code, please download it here: http://data.konstochvanligasaker.se/markus/GiveMeWindow.zip Any other suggestions are welcome. -- Markus Amalthea Magnuson http://konstochvanligasaker.se http://nattlek.se Life... is like a grapefruit. It's orange and squishy, and has a few pips in it, and some folks have half a one for breakfast. – Douglas Adams ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/lists%40goiser.com This email sent to [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Fwd: Problems when putting a window between desktop and desktop icons
(I accidentally posted this directly to the poster instead of the list.) On Tue, Oct 21, 2008 at 23:09, Charles Steinman [EMAIL PROTECTED] wrote: --- On Tue, 10/21/08, Markus Amalthea Magnuson [EMAIL PROTECTED] wrote: This half transparent red color covers the desktop, but not the desktop icons. So far, so good. The problem however, is that my window intercepts all mouse clicks, even if I click on an icon. Does [window setIgnoresMouseEvents:YES] work? Yes it does, as does setting the alpha value to zero. However, I _want_ to intercept mouse events, just not when I click an icon. My window should not intercept those clicks since it is obviously behind the icons, but it does anyway. -- Markus Amalthea Magnuson http://konstochvanligasaker.se http://nattlek.se Life... is like a grapefruit. It's orange and squishy, and has a few pips in it, and some folks have half a one for breakfast. – Douglas Adams ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Problems when putting a window between desktop and desktop icons
Am 24.10.2008 um 11:09 Uhr schrieb Markus Amalthea Magnuson: My window should not intercept those clicks since it is obviously behind the icons, but it does anyway. Ah. I never noticed that. I can only speculate, but I guess it's actually the background view that is handling icon selection; makes sense since you can also drag- select multiple icons using a rubber band. If that's the case, you are probably out of luck. Andreas ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Problems when putting a window between desktop and desktop icons
On Tue, 21 Oct 2008 20:43:00 +0200, Markus Amalthea Magnuson [EMAIL PROTECTED] said: Hello, I am trying to put a window above the desktop but below the desktop icons. I have achieved this by using the following code (in my own subclass of NSWindow): [self setLevel:kCGDesktopIconWindowLevel - 1]; I think what you want to say is CGWindowLevelForKey(kCGDesktopWindowLevelKey). This should be more robust than manipulating the level value directly. m. -- matt neuburg, phd = [EMAIL PROTECTED], http://www.tidbits.com/matt/ A fool + a tool + an autorelease pool = cool! One of the 2007 MacTech Top 25: http://tinyurl.com/2rh4pf AppleScript: the Definitive Guide - Second Edition! http://www.amazon.com/gp/product/0596102119 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Problems when putting a window between desktop and desktop icons
On Thu, Oct 23, 2008 at 19:26, Matt Neuburg [EMAIL PROTECTED] wrote: Hello, I am trying to put a window above the desktop but below the desktop icons. I have achieved this by using the following code (in my own subclass of NSWindow): [self setLevel:kCGDesktopIconWindowLevel - 1]; I think what you want to say is CGWindowLevelForKey(kCGDesktopWindowLevelKey). This should be more robust than manipulating the level value directly. Thanks for the tip! However, that doesn't really solve my problem, which I am beginning to think is a bug on Apple's behalf. If anyone is interested in some sample code, please download it here: http://data.konstochvanligasaker.se/markus/GiveMeWindow.zip Any other suggestions are welcome. -- Markus Amalthea Magnuson http://konstochvanligasaker.se http://nattlek.se Life... is like a grapefruit. It's orange and squishy, and has a few pips in it, and some folks have half a one for breakfast. – Douglas Adams ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Problems when putting a window between desktop and desktop icons
Am 23.10.2008 um 19:48 Uhr schrieb Markus Amalthea Magnuson: Any other suggestions are welcome. I did not see any reply to Charles' suggestion: Am 21.10.2008 um 23:09 Uhr schrieb Charles Steinman: Does [window setIgnoresMouseEvents:YES] work? In case that does *not* work, you may need to additionally tell Carbon that you want the window to ignore mouse events: - (void)setClickThrough:(BOOL)clickThrough { /* carbon */ void *ref = [window windowRef]; if (clickThrough) { ChangeWindowAttributes(ref, kWindowIgnoreClicksAttribute, kWindowNoAttributes); } else { ChangeWindowAttributes(ref, kWindowNoAttributes, kWindowIgnoreClicksAttribute); } /* cocoa */ [window setIgnoresMouseEvents:clickThrough]; } Andreas ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Problems when putting a window between desktop and desktop icons
Hello, I am trying to put a window above the desktop but below the desktop icons. I have achieved this by using the following code (in my own subclass of NSWindow): [self setLevel:kCGDesktopIconWindowLevel - 1]; I can see that it at least visually works by using: [self setBackgroundColor:[NSColor redColor]]; [self setAlphaValue:0.5]; This half transparent red color covers the desktop, but not the desktop icons. So far, so good. The problem however, is that my window intercepts all mouse clicks, even if I click on an icon. I've set up a simple test by handling |mouseUp:| in the following way: NSLog(@Received %d clicks, [theEvent clickCount]); I get this log message for all clicks, even when clicking desktop icons. I've also tried to subtract 1 from the window level for each click, to try each subsequent window level but the problem persists att all available window levels, all the way to the lowest one (which seems to be -2147483647, after which I get a PSsetwindowlevel, error setting window level (1001) error). Is there any way at all to put a window at the desired level, between desktop and desktop icons, but still not have it intercept clicks from icon areas? regards -- Markus Amalthea Magnuson http://konstochvanligasaker.se http://nattlek.se Life... is like a grapefruit. It's orange and squishy, and has a few pips in it, and some folks have half a one for breakfast. – Douglas Adams ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Problems when putting a window between desktop and desktop icons
--- On Tue, 10/21/08, Markus Amalthea Magnuson [EMAIL PROTECTED] wrote: This half transparent red color covers the desktop, but not the desktop icons. So far, so good. The problem however, is that my window intercepts all mouse clicks, even if I click on an icon. Does [window setIgnoresMouseEvents:YES] work? Cheers, Chuck ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]