Waking up a powerbook with a mouse click

mac

    Next

  • 1. Help locating click in OS X
    I have an event handler for mouse down events in the content region of a window (under Carbon). To set up the handler, I have used the following code: EventTypeSpec mdEvent = { kEventClassWindow, kEventWindowClickContentRgn }; InstallEventHandler (GetWindowEventTarget (theWind), NewEventHandlerUPP (theHandler), 1, &mdEvent, NULL, NULL); Within theHandler(), I have code similar to the following: GetPort (&prevPort); SetPortWindowPort (theWind); GetEventParameter (event, kEventParamWindowMouseLocation, typeQDPoint, NULL, sizeof (where), NULL, &where); if (PtInRect (where, &theRect)) ... I thought kEventParamWindowMouseLocation would return coordinates in screen relative terms. This seems to be generally true, though the vertical coordinates apprear to NOT take into account the top window frame. [This is a standard document window with the three buttons in the top left corner.] Under older Mac OS versions I would grab the global coordinates of the mouseDown and perform a GlobalToLocal() conversion. This worked correctly and did take the window frame into account. I am very new to OS X programming. Am I doing this incorrectly? What is the right way? Thanks, John -- John A. Dundas III Director, Information Technology Services, Caltech Mail Code: 014-81, Pasadena, CA 91125-8100 Phone: 626.395.3392 FAX: 626.449.6973
  • 2. Where are vec_free and vec_malloc?
    Where are vec_free and vec_malloc? Which header file and which framework? I'm using ProjectBuilder version 2.1 on OS X 10.2.8 to build the FFT sample program described in vDSP_Library.pdf. I'm getting errors saying that the compiler doesn't recognize those symbols and the linker can't find the code. altivec_support.pdf says they are in stdlib.h, but they are not. The sample code includes vSDP.h and vfp.h, but they aren't there. I've looked everywhere I can think of. I'd like to grep every file on my computer to find any that contain "vec_malloc", but I've forgotten how to do that. When I use the Finder's Find command to look inside files for "vec_malloc", it returns files that include "malloc", which means I get a million file names. Mike
  • 3. common type codes & creator codes?
    I working on a app that changes type & creator codes, among other things. I would like to know what you consider the 3 most common type codes and the 3 most common creator codes. I need this info to give my users a quick way to make common changes. Thank in advance.
  • 4. Xcode Problems
    Hi all. I've just installed Xcode and started a little project. I want to write a little shell program that will use socket and curses. I create a new tool (I am using C). For using sockets there are no problems (standard include works quite fine, but sometimes miss-behaves and returns a lot of parse errors) but I can't find out where to specify how to include -lncurses flag to link against ncurses. Thank you in advance. Raf
  • 5. Developing for Jaguar on Panther?
    I'd like to upgrade my two systems to Panther. However, I develop and distribute software for several OSes including OS X, and would like to build software that will run on Jaguar as wella s Panther, at least for the next few months until Panther is widely adopted. Can I build a package on Panther that will install and run on Jaguar?

Waking up a powerbook with a mouse click

Postby Z » Sun, 06 Mar 2005 14:23:30 GMT

I have a G3 powerbook (400 MHz; Pismo, I think) running OS 10.3.7. When 
put to sleep, it wakes up in response to keyboard activity, but not to 
mouse activity (either moving or clicking); that seems to be an 
intentional feature. It doesn't matter if I use an external mouse or the 
touchpad.

However, I woud like to be able to wake it up in response to clicking an 
external USB mouse (the reason is complicated, but suffice it to say 
this is not a normal use for this computer). My question is: is that 
something that can be controlled in software, ideally through changing a 
config file somewhere?

Thanks in advance, Z

Re: Waking up a powerbook with a mouse click

Postby matt » Mon, 07 Mar 2005 01:21:37 GMT




It will probably wake up in response to plugging in the mouse (or to
unplugging it and plugging it back in). m.


-- 
matt neuburg, phd =  XXXX@XXXXX.COM ,  http://www.**--****.com/ 
AppleScript: The Definitive Guide
 http://www.**--****.com/ 
Read TidBITS! It's free and smart.  http://www.**--****.com/ 

Re: Waking up a powerbook with a mouse click

Postby Pete Verdon » Mon, 14 Mar 2005 11:13:35 GMT




I don't think so. For what it's worth, my AlBook wakes to mouse clicks 
but not mouse movement (makes sense - it's too easy to move the mouse). 
The way you talk about "not a normal use" makes me wonder about other 
solutions, though. If you could explain what you're trying to do we may 
be able to help further, but here are my initial thoughts:

There are four ways I know of to wake a machine. We need to "hijack" one 
of them.

1. Wake-on-lan. Too complex to be improvised, but if there is another 
machine involved (on the same lan or over the internet) it could send a 
magic packet to wake your Pismo up.

2. Wake-on-ring. You'd want to read up on telephony a little before 
trying this, but a ring signal is basically just a (fairly high-voltage) 
pulse on the line. You could assemble something that would send such a 
voltage into the laptop modem and wake it up.

3. Keypresses. Could whatever was going to click your mouse button press 
a key instead? Either through some kind of mechanical linkage or through 
a switch that energises a solenoid and presses a key.

4. USB device insertion. My Powerbook wakes up when you plug or unplug a 
USB device. You could get a cheap USB mouse (or similar) and fit a 
switch in-line with the cable. I don't know what actually triggers a 
"connect" - a four-pole, four-throw switch would definitely work 
(electrically identical to plugging or unplugging) but you may be able 
to use less.

Let us know what you're actually trying to do, but these may get you on 
the right track.

Pete

Re: Waking up a powerbook with a mouse click

Postby Reinder Verlinde » Mon, 14 Mar 2005 19:31:28 GMT

In article <d107kh$55$ XXXX@XXXXX.COM >,




That four-pole switch would have to be carefully constructed to us a 
safe order of closing the contacts. If you look at an USB cable, you 
will see that the outer (easily visible) metal contacts 'the other side' 
earlier than the four inner pieces of metal. This is with good reason (I 
believe that construction assures that the two devices have a shared 
earth before making electrical contact)

Reinder

Re: Waking up a powerbook with a mouse click

Postby russotto » Fri, 18 Mar 2005 04:10:06 GMT

In article < XXXX@XXXXX.COM >,



You can simply leave the ground connected at all times.  Not that it's
going to matter a whit when connecting an unpowered plastic USB mouse.
-- 
  There's no such thing as a free lunch, but certain accounting practices can
  result in a fully-depreciated one.

Re: Waking up a powerbook with a mouse click

Postby neillmassello » Fri, 18 Mar 2005 05:21:54 GMT




Unlikely, because waking is a function of the PMU (power management
unit) that obeys its own firmware and the settings in its non-volatile
RAM (NVRAM) while all processing by the CPU is halted. The available
NVRAM settings vary somewhat by Mac model. I don't know what they are on
a Pismo, but I doubt that you can change anything relating to its
response to USB signals while asleep. 

Macs are designed to wake in response to a RESUME signal from a USB
device  -- although in my experience just about any disturbance,
including a static discharge near a USB cable, seems to have the same
effect. Apparently, keyboards send this signal on a key press but mice
don't on a click. 


Re: Waking up a powerbook with a mouse click

Postby Steven Fisher » Wed, 23 Mar 2005 04:12:23 GMT

In article < XXXX@XXXXX.COM >,




At the risk of stating the obvious, have you tried a different mouse?

-- 
Steven Fisher;  XXXX@XXXXX.COM 
"Morituri Nolumus Mori."

Similar Threads:

1.waking up from sleep= no mouse click

after waking my g4 up from sleep in os9 (where i always work), i
can't get mouse clicks to "take"-- the mouse moves fine but clicking
does nothing.  i have to restart to get the mouse to work again. 
this problem surfaced after loading some music software (logic audio
4).  i didn't do anything out of the ordinary when loading logic, so
i can't figure out what's wrong.  any help would be appreciated.

2.Word crashes when I hit ctrl and mouse click (equivelent of mouse right click)

Version: 2004
Operating System: Mac OS X 10.4 (Tiger)
Processor: Intel

Hello,  <br>
My word program stops responding (freezes) whenever I use the control key (ctrl) with the mouse click. This essentially prohibits all the functions you use a right click on a mouse, such as spell checking a work. The program stops working and I have to force quit.  <br><br>Someone at the Mac store thought it might have to do with macros but I have no idea what to do or what that means. Any help would be very appreciated. Thanks so much!

3.waking up a powerbook with ether-wake

I am trying to use a Linux system to send a wake-on-lan packet to a
powerbook that's running MacOS 10.3.x. The command I am using is

ether-wake -D -i eth0 00:30:65:F9:C1:62


So far, it doesn't seem to work. Any suggestions?


-akop

4.strange "spontaneous" system wake ups

hi there

i experience strange system wake ups of my mac os x 10.3 system on a
flatpanel iMac:

at night i put the computer to sleep, but _sometimes the system
spontaneously wakes up in the middle of the night.
i thought the ethernet/broadband connection might cause it but i think it
happens as well without ethernet plugged in...
the other cause could be the wireless apple keyboard, however in the
appropriate preferences i left the box " bluetooth is allowed to wake up"
un-ticked.

do other people have similar experiences? and what can i do to avoid this
annoyance?

thanks, leo


5.How to mimic Left Click or double click of mouse on Win32 on Mac OS

On Apr 13, 2005, at 12:01 PM, Xu, Ming (NIH/NLM/NCBI) wrote:

> Hello.
>
> An Win32 application written in wxWindows takes actions on left click 
> and
> left double click. When porting the codes onto Mac, how can those mouse
> Events be mimiced or simulated ?
>
One normally has the user click the mouse button either once or twice.

-Dave


---------------------------------------------------------------------
To unsubscribe, e-mail:  XXXX@XXXXX.COM 
For additional commands, e-mail:  XXXX@XXXXX.COM 

6. How to mimic Left Click or double click of mouse on Win32 on Mac OS

7. Missing typing, mouse clicks, mouse movements - Leopard 10.5.1

8. USB mouse wake from sleep



Return to mac

 

Who is online

Users browsing this forum: No registered users and 9 guest