comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Cursor problems, MAC and PC
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Cursor problems, MAC and PC [message #30698] Thu, 09 May 2002 08:03 Go to next message
Ted Cary is currently offline  Ted Cary
Messages: 53
Registered: October 2001
Member
I have been porting some of my lab's IDL 5.4 Macintosh programs to a Windows
2000 PC running 5.5. Programs that change the cursor image have been having
problems, both in direct graphics and object graphics.

1.) On the Mac, just setting the cursor without setting a mask appears to
cause the cursor image to be XOR-ed with the window contents, so it is
always visible against the background. On the PC, unmasked custom cursors
disappear against black backgrounds, as described in the online help, but
the standard cursors set with the CURSOR_STANDARD keyword to DEVICE do
exhibit the XOR-like behavior. Can the XOR behavior be achieved with custom
cursors on a Windows machine?

2.) In Windows, calls to DEVICE with the CURSOR_IMAGE keyword cause a new
direct graphics window to pop up if one is not already open. This did not
happen in the Mac programs. Is there a way to turn this off?

3.) In Macintosh object graphics windows, setting the cursor with
IDLgrWindow::SetCurrentCursor causes some problems. While dragging the
mouse across the viewport, the cursor constantly cycles between the object
window cursor and the direct graphics cursor. This was easily solved by
setting the direct graphics cursor to the same thing as the object window
cursor. On Windows this cursor cycling does not occur; instead new direct
graphics windows keep popping up whenever the cursor is changed (see #2).

I can fix these problems in Windows by drawing and setting masks for each
cursor and taking out all the extra calls to DEVICE, but I was hoping for a
less time consuming, cross-platform solution. The Macintosh object
graphics cursor cycling is particularly troublesome, although the workaround
is simple enough. Is this a known bug or a common programming mistake? Has
anyone experienced or solved any of these problems?

Thanks for any help,

Ted Cary
Re: CURSOR problems [message #45198 is a reply to message #30698] Mon, 22 August 2005 18:24 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Richard G. French writes:

> There must be a way to make it work!

Clean living, Dick, is the only way, I'm pretty sure.
I congratulate you on your success. :-)

Cheers,

David

P.S. We are going through the annual computer shuffle
here. Have you ever tried to get a teenager's computer
working properly for your wife? Any you think YOU have
troubles! :-)

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: CURSOR problems [message #45199 is a reply to message #30698] Mon, 22 August 2005 18:01 Go to previous messageGo to next message
Ken Mankoff is currently offline  Ken Mankoff
Messages: 158
Registered: February 2000
Senior Member
On Mon, 22 Aug 2005, Kenneth Bowman wrote:
>
> I did search through the group before posting, but didn't have the
> right keywords. :-(

Funny, because you took part in that thread in both of its
life-spans. Ahh. Information overload. Where to store it all?

-k.
Re: CURSOR problems [message #45200 is a reply to message #30698] Mon, 22 August 2005 17:00 Go to previous messageGo to next message
Ken Mankoff is currently offline  Ken Mankoff
Messages: 158
Registered: February 2000
Senior Member
On Mon, 22 Aug 2005, David Fanning wrote:

> Ken Mankoff writes:
>
>> Without running your code, I think I might have already dealt with
>> this here:
>>
>> http://groups-beta.google.com/group/comp.lang.idl-pvwave/bro wse_thread/thread/a2c4c8a401d89bba/05b5e8ecdcca33af?q=mankof f+x11&rnum=1#05b5e8ecdcca33af
>
> It take about 5 seconds to turn this:
>
> http://groups-beta.google.com/group/comp.lang.idl-
> pvwave/browse_thread/thread/a2c4c8a401d89bba/05b5e8ecdcca33a f?
> q=mankoff+x11&rnum=1#05b5e8ecdcca33af
>
> Into this:
>
> http://tinyurl.com/dx8rq
>
> Isn't that better. :-)

If you like tinyurl you might also like this:

http://tinyurl.com/duqnc

-k.
Re: CURSOR problems [message #45201 is a reply to message #30698] Mon, 22 August 2005 17:04 Go to previous messageGo to next message
Richard French is currently offline  Richard French
Messages: 173
Registered: December 2000
Senior Member
On the subject of cursor focus in X11 on Mac OSX, I have a problem that I
hope someone can help with (not specifically IDL - related):

I use Apple X11 to create xterms from which I run IDL. I am running IDL 6.2
on Mac OSX 10.3 and 10.4. The problem is this:

When I try to cut and paste from one xterm to another within X11 (not
between applications) I can paste highlighted text by moving to the
destination window and middle-clicking - this is typical X behavior and
works fine. I don't remember doing anything special to make this work.

Here is the problem - for EVERY OTHER account on these machines, users are
unable to get cut and paste within X11 to work. I've confirmed that we are
using the same settings within X11:

> Defaults read com.apple.X11

"done_xinit_check" = 1;
"enable_fake_buttons" = 0;
"enable_key_equivalents" = 0;
"enable_system_beep" = 1;
"wm_ffm" = true;

I've also checked Mouse settings under System Preferences but to no avail

Clearly, there is something different about my setup and everyone else's,
but I am stumped about what it might be. I've Googled for this but no one
has commented on the WITHIN X11 cut and paste problem that I can see. (A
second issue is getting cut and paste to work between X11 and other
applications...)

Anyone have any ideas? I have users in my dept who don't want to use the Mac
because of this cut and paste failure. There must be a way to make it work!

Thanks!

Dick French
Re: CURSOR problems [message #45203 is a reply to message #30698] Mon, 22 August 2005 14:55 Go to previous messageGo to next message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <Pine.OSX.4.61.0508221646360.5328@gouda.local>,
Ken Mankoff <mankoff@gmail.com> wrote:

> Without running your code, I think I might have already dealt with
> this here:
>
> http://groups-beta.google.com/group/comp.lang.idl-pvwave/bro wse_thread/thread/
> a2c4c8a401d89bba/05b5e8ecdcca33af?q=mankoff+x11&rnum=1#0 5b5e8ecdcca33af
>
> Solution:
>
> % defaults write com.apple.x11 wm_click_through -bool true

Yup. Thanks for the help, Ken.

I did search through the group before posting, but didn't have the right
keywords. :-(

Ken B.
Re: CURSOR problems [message #45207 is a reply to message #30698] Mon, 22 August 2005 14:03 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ken Mankoff writes:

> Without running your code, I think I might have already dealt with
> this here:
>
> http://groups-beta.google.com/group/comp.lang.idl-pvwave/bro wse_thread/thread/a2c4c8a401d89bba/05b5e8ecdcca33af?q=mankof f+x11&rnum=1#05b5e8ecdcca33af

Here is a wonderful little site everyone ought to have
bookmarked in their browser:

http://tinyurl.com/

It take about 5 seconds to turn this:

http://groups-beta.google.com/group/comp.lang.idl-
pvwave/browse_thread/thread/a2c4c8a401d89bba/05b5e8ecdcca33a f?
q=mankoff+x11&rnum=1#05b5e8ecdcca33af

Into this:

http://tinyurl.com/dx8rq

Isn't that better. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: CURSOR problems [message #45209 is a reply to message #30698] Mon, 22 August 2005 13:47 Go to previous messageGo to next message
Ken Mankoff is currently offline  Ken Mankoff
Messages: 158
Registered: February 2000
Senior Member
Without running your code, I think I might have already dealt with
this here:

http://groups-beta.google.com/group/comp.lang.idl-pvwave/bro wse_thread/thread/a2c4c8a401d89bba/05b5e8ecdcca33af?q=mankof f+x11&rnum=1#05b5e8ecdcca33af

Solution:

% defaults write com.apple.x11 wm_click_through -bool true

-k.


On Mon, 22 Aug 2005, Kenneth Bowman wrote:
>
> Is anyone else having problems with CURSOR? I have never seen
> this behavior before, and I have no idea if it is an IDL or an OS
> issue. I am running IDL 6.1 on Mac OS X 10.4.2.
>
> If I run this program:
>
> PRO TEST_CURSOR
> PLOT, FINDGEN(5)
> CURSOR, x, y, /DATA
> PRINT, x, y
> END
>
> it opens an X window and draws the graph. I click on the graphics
> window to change keyboard focus. Clicking in the window has no
> effect. I click back to my terminal window and interrupt
> execution with control-C. Moving the mouse back to the graphic
> window produces an event just as the mouse enters the window (see
> below).
>
> IDL> test_cursor
> ^C% Interrupted at: TEST_CURSOR 3
> /Network/Servers/csrp.tamu.edu/Volumes/csrp0/Home/bowman/id
> l/test/test_cursor.pro
> IDL> .c
> -0.34877722 1.8760835
>
> This behavior renders CURSOR completely non-functional.
>
> Thanks, Ken Bowman
>
Re: CURSOR problems [message #45212 is a reply to message #30698] Mon, 22 August 2005 12:50 Go to previous messageGo to next message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <MPG.1d73b1e9fce7adbb989a51@news.frii.com>,
David Fanning <davidf@dfanning.com> wrote:

> What happens if you set the DOWN keyword on the CURSOR
> command? Does that change things at all?
>
> David

I belatedly thought to try it with one of our Linux boxes.

This generates an error message as soon as TEST_CURSOR is run

IDL> test_cursor
% X windows protocol error: BadWindow (invalid Window parameter).
% Interrupted at: TEST_CURSOR 3 /h/bowman/idl/test/test_cursor.pro


It looks like it is an issue with Apple's X11 in 10.4. I'll submit a report to
RSI.

Ken
Re: CURSOR problems [message #45217 is a reply to message #30698] Mon, 22 August 2005 10:00 Go to previous messageGo to next message
Timm Weitkamp is currently offline  Timm Weitkamp
Messages: 66
Registered: August 2002
Member
R.G. Stockwell wrote:
> "Kenneth Bowman" <k-bowman@null.tamu.edu> wrote in message
> news:k-bowman-4F8C65.10384122082005@news.tamu.edu...
>> Is anyone else having problems with CURSOR? I have never seen this
>> behavior
>> before, and I have no idea if it is an IDL or an OS issue. I am running
>> IDL 6.1
>> on Mac OS X 10.4.2.
>>
>> If I run this program:
>>
>> PRO TEST_CURSOR
>> PLOT, FINDGEN(5)
>> CURSOR, x, y, /DATA
>> PRINT, x, y
>> END
> ...
>> Thanks, Ken Bowman
>
> Works fine here
> IDL Version 6.1.1, Microsoft Windows (Win32 x86 m32). (c) 2004, Research
> Systems, Inc.

Works all right here as well.
{ x86 linux unix linux 6.1 Jul 14 2004 32 64}

Timm Weitkamp
ESRF, Grenoble, France
Re: CURSOR problems [message #45218 is a reply to message #30698] Mon, 22 August 2005 09:58 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kenneth Bowman writes:

> Is anyone else having problems with CURSOR? I have never seen this behavior
> before, and I have no idea if it is an IDL or an OS issue. I am running IDL 6.1
> on Mac OS X 10.4.2.
>
> If I run this program:
>
> PRO TEST_CURSOR
> PLOT, FINDGEN(5)
> CURSOR, x, y, /DATA
> PRINT, x, y
> END
>
> it opens an X window and draws the graph. I click on the graphics window to
> change keyboard focus. Clicking in the window has no effect. I click back to
> my terminal window and interrupt execution with control-C. Moving the mouse
> back to the graphic window produces an event just as the mouse enters the window
> (see below).
>
> IDL> test_cursor
> ^C% Interrupted at: TEST_CURSOR 3
> /Network/Servers/csrp.tamu.edu/Volumes/csrp0/Home/bowman/id
> l/test/test_cursor.pro
> IDL> .c
> -0.34877722 1.8760835
>
> This behavior renders CURSOR completely non-functional.

What happens if you set the DOWN keyword on the CURSOR
command? Does that change things at all?

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: CURSOR problems [message #45219 is a reply to message #30698] Mon, 22 August 2005 09:30 Go to previous messageGo to next message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"Kenneth Bowman" <k-bowman@null.tamu.edu> wrote in message
news:k-bowman-4F8C65.10384122082005@news.tamu.edu...
> Is anyone else having problems with CURSOR? I have never seen this
> behavior
> before, and I have no idea if it is an IDL or an OS issue. I am running
> IDL 6.1
> on Mac OS X 10.4.2.
>
> If I run this program:
>
> PRO TEST_CURSOR
> PLOT, FINDGEN(5)
> CURSOR, x, y, /DATA
> PRINT, x, y
> END
...
> Thanks, Ken Bowman

Works fine here
IDL Version 6.1.1, Microsoft Windows (Win32 x86 m32). (c) 2004, Research
Systems, Inc.



Cheers,

bob
Re: CURSOR problems [message #45295 is a reply to message #45199] Tue, 23 August 2005 07:09 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <Pine.OSX.4.61.0508222000470.5937@gouda.local>,
Ken Mankoff <mankoff@gmail.com> wrote:

> On Mon, 22 Aug 2005, Kenneth Bowman wrote:
>>
>> I did search through the group before posting, but didn't have the
>> right keywords. :-(
>
> Funny, because you took part in that thread in both of its
> life-spans. Ahh. Information overload. Where to store it all?
>
> -k.

I know. I remembered that there was a thread about problems with X11 on OS X,
but couldn't recall the specifics. I certainly couldn't remember that I had
actually posted anything! ;-)

Ken
Re: CURSOR problems [message #45296 is a reply to message #45201] Tue, 23 August 2005 05:39 Go to previous message
Patrick Broos is currently offline  Patrick Broos
Messages: 27
Registered: December 1996
Junior Member
I don't have any ideas on your xterm configuration, but as a Solaris
user just moving to OS-X I do have a suggestion about xterms: leave
them behind! As long as $DISPLAY is set correctly you can start X11
programs from a shell running in any terminal application.
Terminal.app (from Apple) is better than xterm, and iTerm is even
better than Terminal.app. You'll be able to use much better fonts than
I could ever get in xterm (on OS-X), multiple ("tabbed") shells, full
integration with other OS-X applications (e.g. drag a file from Finder
and the file's path is printed in the shell), standard OS-X keyboard
shortcuts, configurable menus (e.g. to ssh to favorite other machines),
middle mouse paste, focus-follows-mouse, etc. Here's some code I found
to put in .cshrc to set $DISPLAY in all shells:

# Set DISPLAY so that Carbon terminals can run X
applications.
# This only works if an X server is running; it's a
good idea to start
# an X server at login via System
Preferences->Accounts->Login Items.
# Figure the correct value for DISPLAY from the lock
files /tmp/.X?-lock
if ($?DISPLAY == 0) then
foreach x (0 1 2 3 4 5 6 7 8 9 )
if ( -o /tmp/.X$x-lock ) then
setenv DISPLAY :${x}.0
break
endif
end
endif

I choose to start the X11 server automatically at login.

Patrick Broos
Re: CURSOR problems [message #45297 is a reply to message #45200] Mon, 22 August 2005 18:25 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ken Mankoff writes:

> If you like tinyurl you might also like this:
>
> http://tinyurl.com/duqnc

Oh, yes, absolutely! I've got to have it! :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Building Voxel arrays from png files (compression, analysis, and visualization)
Next Topic: averaging over same index

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:09:55 PDT 2025

Total time taken to generate the page: 0.00793 seconds