Commit Graph

251 Commits

Author SHA1 Message Date
Ryan Leavengood
cb6a084f20 Fixed a bug in the screen saver code that could cause someone to get locked out
of their machine: if the password check is turned on, and the password window
is shown but times out (when the screen saver starts again after the standard
delay), the input filter never knew about this and would never try to end the
screen saver again.

The solution is to take the logic for turning off the screen saver out of the
input filter and put it in the screen blanker itself.

Also while working in the input filter I removed some debugging and a TODO that
I think cannot be fixed.

In the screen_blanker the exit after loading the settings file was removed
since the default settings now work for the screen_blanker.

Plus obviously code was added to handle exit upon user input as well as the
timing out of the password window.

If anyone has a better solution for the 250ms timeout to ignore initial mouse
moves, let me know.

Also I think the new calls should be nothrow, but I am not sure what the rule
is for that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29488 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-13 04:51:52 +00:00
Stephan Aßmus
5994d47ab4 Since there are problems with VMWare, ioctl()ing at fixed intervals seems like
the better idea after all. The snoozing won't add an additional delay, if the
polling was already slow. Have not tested in VMWare myself, as I don't have a
working installation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29436 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-08 01:01:06 +00:00
Stephan Aßmus
7d1d70339a Limit the number for ioctl()s per second to about 125 for mouse transfers. This
fixes the high CPU usage when using USB mice. I experimented with transfers
scheduled at fixed intervals, and with using a fixed pause between transfers.
The fixed pauses, though much less sophisticated, give the smoothest drawing
in WonderBrush. ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-06 11:11:58 +00:00
Michael Lotz
fb3e35fcec Fixing all headers/namespaces/name lookup problems that hinder a GCC 4.3.2
build. I sure hope that this doesn't break the build for anyone else.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28992 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-23 03:05:15 +00:00
Axel Dörfler
095f2c0e21 * Applied patch by Olivier: corrects vertical text positioning. This closes
ticket #3266, thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-07 19:32:46 +00:00
Rene Gollent
cf44fcdb52 Updated patch from Olivier Cortes - complete the list of modifier keys that are checked and returned. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-11 04:27:56 +00:00
Rene Gollent
3332e5b796 Correct small style violation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-10 14:36:53 +00:00
Rene Gollent
932334b709 Build fix, thanks to Olivier Cortes for submitting!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28797 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-10 14:34:36 +00:00
Jérôme Duval
4f8e7ecc5a * use the keymap control and command keys to trigger the team monitor
* this fixes part of #3176 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-08 20:50:16 +00:00
Stephan Aßmus
6e094221e8 * Fixed the mouse movement when speed or acceleration where below default
values. The implementation needs to sum up fractional movement, not
  truncate to zero. Before this change, the mouse would be pretty much unusable
  at lower speeds/acceleration. Now it is guaranteed to move.
* No need to memset() before ioctl(), the driver does that anyways.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-16 22:21:34 +00:00
Rene Gollent
e02ed691ca Patch by Adrian Panasiuk: fix broken TRACE macro definitions (ticket #3133). Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-15 02:42:56 +00:00
Stephan Aßmus
167f43a24c Merged touchpad input_server device into mouse. This gets rid of a lot of
code duplication and will make maintaining it much easier.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-14 10:41:22 +00:00
Stephan Aßmus
9195fe6efe * Don't return B_OK from Start() if opening the device failed. Then Stop()
won't be called, the control thread will remove the device anyways.
* Turned off the debug output I left on accidentally in KeyboardInputDevice.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-13 22:14:40 +00:00
Stephan Aßmus
cc44241143 Prepend the mouse name with "Extended " if the device path contains "intelli". This makes
sure that you can have an old style mouse without scroll wheel and one with attached at the
same time. For example, when I hot-plug my PS/2 mouse with wheel, the IBM trackpoint will
otherwise already use up the "PS/2 Mouse 1" name.

Unfortunately, hot-plugging the PS/2 mouse on my T60 docking station still does not work
quite right. The PS/2 driver detects everything correctly, the node monitoring works and I end
up with the correct device threads in the input_server. (The notebook is automatically removing
the touchpad and trackpoint devices in this event, which cannot be turned off in the BIOS.)
However, the mouse does not move. In the syslog, I see one message
"ps2: strange mouse data, x/y overflow, trying resync" after the the output from the add-on
manager in the input_server that it has added the new device. When I restart the input_server,
it works fine, even though the same devices are detected and polling threads are running.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-10 12:33:16 +00:00
Stephan Aßmus
5125eae25d * Cleanup and refactoring, made several Mouse-/Keyboard-/TouchpadDevice
functions private and moved them accordingly in the file.
* I forgot to initialize the BObjectList to own the items in
  TouchpadInputDevice.
* Changed the methods that read and apply settings in all three addons to be
  executed from the control threads only, which fixes race conditions.
* The success of opening a device is no longer checked in the Start() method
  of the *Devices. Instead, the control thread checks the device before it
  enters the polling loop and cleans up if there was an error. This fixes
  non-running devices in the input_server because the PS/2 driver publishes
  devices which is has not checked yet for other reasons. It is important,
  however, to open() the devices in the Start() hook and not the control
  thread, otherwise there are unwanted race conditions in case node monitoring
  events are received more than once for the same device. That's the case
  for some reason on one of my computers for the AT 0 keyboard.

TODO:
* Combine the Touchpad and Mouse device addon into one, it's almost the
  same code except the Touchpad knows more settings and one more control
  message.
* Refactor a common base class for Keyboard and Mouse device addon.
* Fix the mouse speed/acceleration. If the speed is lowered from the default
  in the preflet, the mouse becomes almost unusable. To fix this, the same
  trick should be used as I used in the touchpad kernel driver, which is to
  sum up previous mouse moved fractional offsets.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28590 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-10 11:16:02 +00:00
Stephan Aßmus
bff51d943a Recursive scanning of already existing touchpad devices in the devfs never
worked, because the root scanning directory was declared without "/dev/".
This makes restarting the input_server work with the touchpad driver.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-02 13:15:47 +00:00
Stephan Aßmus
855012f2bd * Followed a suggestion made by Axel and removed the custom logfile
solution and replaced it by dumping output to the syslog. (Also
  disabled debug output by default.)
* Fixed wrong header guard.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28463 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-02 12:55:18 +00:00
Stephan Aßmus
287f426f6a * Coding style cleanup
* Applied the changes that were done to MouseInputDevice:
	- use BObjectList,
	- take adventage of BPathMonitor node monitor message fieds
	- remove the device in the polling thread upon ioctl() error
* Added TODOs about refactoring the code together with MouseInputDevice.
Untested, but the code is so similar, I am pretty confident it still works.
(famous last words... will test soon anyways)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28421 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-01 11:40:48 +00:00
Stephan Aßmus
239fd643df * Added Clemens Zeidler to list of authors of the Touchpad add-on.
* Added myself to Mouse and Keyboard add-ons for my recent work on them.
* Small cleanup in KeyboardInputDevice.h-


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28420 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-01 11:09:28 +00:00
Stephan Aßmus
6849a22864 Patch by Clemens Zeilder:
* Implemented Synaptics touchpad support in the PS2 bus_manager by
  refactoring/splitting the structure some and adding touchpad device
  handling.
* Implemented Touchpad input_server device add-on
* Created Touchpad preflet for configuring advances Synaptics touchpad
  options like scroll region (both horizontal and vertical) as well
  as other neat stuff

Thanks a lot, Clemens!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28416 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-01 10:48:35 +00:00
Stephan Aßmus
e01a043190 Sorry for the confusing patch...
* Made KeyboardInputDevice more similar to MouseInputDevice, the object to
  track individual keyboards has become the class KeyboardDevice. Moved
  much functionality that used to be in KeyboardInputDevice into
  KeyboardDevice.
  Functionally, it should still be the same, but there are two important
  changes:
  - Each KeyboardDevice now has it's own Keymap. At first, it is not
    visible by the user, since all KeyboardDevices still adopt the keymap
    if the user reconfigures it. But it will make it easier to assign
    individual keymaps to each attached keyboard (and perhaps associate them
    with a vendor/product or some other means). The more immediate side effect
    is that there is no longer a confusion about the keyboard locks. If
    you press NumLock on your external keyboard, it will no longer enable
    NumLock on your notebooks internal keyboard.
  - KeyboardDevice now has a Stop() method, which it will call in it's
    destructor. This will make sure that the control thread is cleanly
    exited and does not end up invoking methods on a deleted object.
* Rewrote the tracing implementation in MouseInputDevice.cpp. At least it
  helped track me down the following problem:
* Both KeyboardDevice and MouseDevice now set fActive to "false" *before*
  closing the device. Since the control threads run at high priority, chances
  are high that rescheduling happens as soon as the device unblocks in
  ioctl() and returns an error. In that case, the control threads would
  check fActive and it would still be "true" and the whole idea of bailing
  out because we're already in Stop() would not work, causing a double free
  in the end.

All of this is nice and more correct, but input_server is still crashing
when restarting it via "input_server -q"... :-(


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28352 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-27 22:40:03 +00:00
Stephan Aßmus
9dd2d40e39 Fixed a race condition and resulting deadlock I introduced, which
resulted in the keyboard not working (at least on my Lenovo/IBM T60).
The device control thread could become aware of a dead device
at the time another thread (for example the add-on manager thread)
is already waiting for it. Then it tried to remove the device and
got stuck on locks that the other thread already holds (InputDeviceItem
list lock). Now the control threads check the "active" flag before
trying to remove the devices themselves, which, when set, is a sure
sign that the devices are already being removed and they don't need
to take care of it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28342 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-27 11:28:25 +00:00
Stephan Aßmus
c5555ad3c0 * Ignore B_ENTRY_REMOVED node monitor messages.
* When the device watcher/control thread encounteres an error when
  read()ing or ioctl()ing the device, don't just quit the thread and
  leave a stale device add-on hanging there, but instead trigger
  _RemoveDevice() to exit this cleanly. This also takes care of calling
  _RemoveDevice() only from one thread. However, it adds a race condition
  should a mouse or keyboard be unplugged and plugged at the same time.
  I need to think about how to fix that cleanly, although the situation
  may be theoretical only... This fix seems to fix another problem with
  hot-plugging USB mice, before this change, the first mouse entry in
  /dev/input/mouse/usb/ was never gone and I got two entries after unplugging
  and replugging.
* When using BObjectList configured to own the entries - don't delete the
  entries! Also don't call RemoveItem() before still using the item. Took
  me all day to find this one, because the code looked so... correct. :-}
* In _AddDevice() call _RemoveDevice() just for the sake of it. It is really
  important that no device with the same name is published twice. The PS/2
  driver behaves strange in that it publishes device more than once, if
  I understand correctly, until it decides that there is no device.
* Only StartMonitoringDevice() /after/ having performed the initial device
  scan! Or else we may get ourselves confused. I don't know if this was
  an actual problem, but the code was like that before and it seems saner
  to me. Seeing there is no locking in the device add-on itself, we may
  already enter the code from the node monitor thread.

This should fix #2894.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 21:46:36 +00:00
Stephan Aßmus
3363dbce1f Small coding style correction.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 21:34:14 +00:00
Stephan Aßmus
c2006b1a52 Don't skip over device items when re-scanning the watched folders for the
devices that were removed. Should use the BPathMonitor anyways...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28315 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 20:36:42 +00:00
Axel Dörfler
68f6bdfbc8 * Added shortcut Command+Shift+T to open a Terminal. For compatiblity with BeOS :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28289 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-22 18:42:21 +00:00
Axel Dörfler
997c3d8afb * Renamed TMWindow to TeamMonitorWindow, TMListItem to TeamListItem, TMDescView
to TeamDescriptionView.
* Renamed files accordingly.
* Minor cleanup (made TeamListItem::fFound private, and added accessor methods).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28261 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-21 12:30:25 +00:00
Axel Dörfler
4d34c4eba6 * The description shown in the team monitor is now actually true: if you keep
ctrl-alt-del pressed for 4 seconds, the system will reboot.
* Not sure if this makes any sense, though, as the button can be selected via
  the keyboard as well (in BeOS, the reboot is triggered in the device, so it
  will also work if the input_server hangs).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-21 12:15:19 +00:00
Axel Dörfler
5ab489bfea * Made the team monitor use the layout engine.
* This is actually a work in progress, but the functionality of the former
  version should be preserved.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28259 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-21 11:16:41 +00:00
Axel Dörfler
b6a7b20419 * Removed the log file stuff; debug output is now using debug_printf() instead.
* Removed an inconsistency: both mouse and keyboad input device add-ons would
  scan /dev/input/keyboard respectively /dev/input/mouse when loaded, but then
  only monitor certain subdirectories from it. Now they monitor all.
* Made KeyboardInputDevice::InitCheck() do what the name says, ie. nothing
  else.
* Now uses BObjectList instead of BList, which also simplifies the code a bit.
* Make use of the new BPathMonitor messages: as those contain a path, they
  greatly simplify their handling.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28242 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-19 15:59:23 +00:00
Axel Dörfler
c597770758 * Renamed the "screensaver" directory to match the name of the filter, ie.
"screen_saver".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-06 09:46:06 +00:00
Axel Dörfler
94cd9aa2ed * The ScreenSaverFilter now uses locking in all public functions to ensure
it works well with its controlling looper. This fixes #2638.
* Header cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27885 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-06 09:41:59 +00:00
Stefano Ceccherini
ef68c59b17 Removed useless _APP_ links
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27840 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-02 09:56:01 +00:00
Stefano Ceccherini
9179339c4a free the allocated strings in error case. CID 864
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27515 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 08:01:33 +00:00
Jérôme Duval
1ccc2f2d7b fix debug build
on Stop(), close the device, then wait for our service thread to quit


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27309 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-03 19:14:37 +00:00
Jérôme Duval
8139985d99 fCornerRunner could be NULL when reloading settings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27049 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 21:06:38 +00:00
François Revol
2e314c0993 Fix build for Haiku.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26061 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 12:49:56 +00:00
François Revol
1f5afb2e36 Add to the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26058 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 12:12:17 +00:00
François Revol
0895a4060f - Add jamfile,
- fix warning.
Note T9 could still be of use on the desktop, for ex by disabled people with enough mobility to access a numeric keypad...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25998 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-17 16:45:20 +00:00
François Revol
a94e61350c The code for an handwriting input method front-end, currently doesn't do much more than draw the strokes over the screen. The idea is to have a base backend class that will be used to call several backends like Lipi Toolkit or others. WIP.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25997 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-17 16:36:54 +00:00
François Revol
087bd9e838 The code for a T9 input method, quite empty yet. WIP.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25996 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-17 16:32:42 +00:00
Ingo Weinhold
6b202f4e3d * Introduced new header directory headers/private/system which is supposed
to contain headers shared by kernel and userland (mainly libroot).
* Moved quite a few private kernel headers to the new location. Split
  several kernel headers into a shared part and one that is still kernel
  private. Adjusted all affected Jamfiles and source in the standard x86
  build accordingly. The build for other architectures and for test code
  may be broken.
* Quite a bit of userland code still includes private kernel headers.
  Mostly those are <util/*> headers. The ones that aren't strictly
  kernel-only should be moved to some other place (maybe
  headers/private/shared/util).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25486 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 03:55:16 +00:00
Jérôme Duval
e6b421a98e fix misuse of ... with B_UTF8_ELLIPSIS
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25261 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-29 21:48:36 +00:00
Stephan Aßmus
d4122828d4 * Reworked debugging feature, it's now much more simple to use, copied
from the input_server implementation to create a log file.
* DeviceReader already provided the data byte count, since this is a USB
  only Wacom driver, we can simply use the max_packet_size from the endpoint
  descriptor. Changed TabledDevice accordingly to use the already existing
  DeviceReader::MaxPacketSize().
* Reworked DeviceReader::ReadData(). Renamed variables for clarity and
  removed the restriction to read exactly the requested ammount of bytes,
  reading more than the "header" (which contains vendor id, product id
  and max packet size) is already considered a successful read.
* Refactored TabledDevice::poll_usb_device().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24018 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-19 16:03:15 +00:00
Stephan Aßmus
dc1bdabb92 * added an input_server add-on for interfacing with the wacom kernel driver
* the structure of the add-on was originally designed to handle all kinds of
  different input devices, but has been limited to handle Wacom tablets for
  now, since our mouse add-on handles the rest already.
* various Wacom Tablets are supported including Cintiq Partner, Graphire,
  Graphire2/3/4, Intuos, Intous2/3, PenStation, PenPartner and Volito

TODO: Currently, the add-on does not work for some reason, though the kernel
driver publishes a devfs entry and the input_server picks it up, the Wacom
device thread is running. Need to investigate...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-20 19:14:25 +00:00
Stephan Aßmus
45f11ce801 * at least with the BeOS input_server it is important that the last
B_MOUSE_MOVED message does not already contain the same buttons as a
  following B_MOUSE_DOWN message... fixes mouse clicks being ignored
  when you are moving the mouse at the same time when clicking
  (using Haiku's mouse input_server device on BeOS or ZETA)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23421 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-11 22:25:08 +00:00
Stephan Aßmus
216310852f * I think I needed this change to compile this for ZETA
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23119 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-12 21:55:40 +00:00
Stefano Ceccherini
d246d9be88 Some old changes I forgot to commit... BInputServerDevice::InitCheck()
now checks if the fOwner allocation went fine (and returns B_NO_MEMORY 
in case it didn't). Since it can fail, inherited classes should call it 
as well (I modified MouseInputDevice's and KeyboardInputDevice's 
versions for now)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23106 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-10 21:20:25 +00:00
Jérôme Duval
ac66f539e6 added a lock around keymap uses to avoid a reload in the middle of the key event process
this fixes bug #1177


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-09 22:31:01 +00:00
Axel Dörfler
c15a5012ef The team monitor now shows the large icon correctly, thanks to Jonas Sundstrom.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21281 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-31 22:12:07 +00:00
Jérôme Duval
218b5bbcc3 clean
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20983 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-02 19:04:44 +00:00
Jérôme Duval
eb58b5e020 now uses _get_key_map() and check offsets against the size of the array
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20918 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-30 10:09:06 +00:00
Jérôme Duval
e7e4c08faf starts monitoring after recursive scanning
node monitoring requires the node directory to exist
this fixes PS2 keyboard node monitoring when unpublishing/publishing


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20916 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-30 09:53:31 +00:00
Ingo Weinhold
1acbe440b8 Removed the obsolete second argument ("relpath") of the Addon rule and
shuffled "isExecutable" to the end. The new order favors the common use
cases. Adjusted all Addon invocations and while at it also removed
separate LinkAgainst invocations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20604 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-07 01:27:19 +00:00
Axel Dörfler
9a8038bf5d Fixed the wrong "be:key_repeats" we were sending to our clients.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19985 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-27 17:04:25 +00:00
Axel Dörfler
9310654a00 You must not delete a running looper - you have to quit it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-05 19:54:35 +00:00
Axel Dörfler
23dac09ac1 * fEnabled is now maintained correctly, so that a screen blanker is now also quit
by _Banish() (never happened before).
* Instead of sending a new message for every mouse move in a corner, we now keep
  one BMessageRunner around and only update its interval; we now also check the
  time with no events in CheckCornerInvoke() - this both makes sure that the screen
  is not blanked while there is still user activity.
* The screen saver never worked if you didn't set the never-blank corner to something.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-04 15:29:52 +00:00
Stephan Aßmus
d0771361ce * use B_RGBA32 icons on Haiku in the TeamMonitor, this and the previous
commits seem to work fine (BTW, what an odd place for the TeamMonitor :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-17 10:15:37 +00:00
Axel Dörfler
3f2cb12385 * Fixed warnings.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19151 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-30 12:53:08 +00:00
Axel Dörfler
bd50618697 The keyboard_device now also acts as the target for input method messages from
the input method aware view.
This was necessary to support stopping an input method on the fly: if you press
the dead key first, then change to another view and press a key that is changed
by the dead key, the resulting key now reaches its target, and will no longer
be ignored.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19119 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-25 12:45:41 +00:00
Axel Dörfler
d32e5bae5e The keyboard input device is now using the new inline-only input method extension
for dead keys - IOW you'll now see dead keys in BTextViews as you would see real
input methods like canna. Non-input-method-aware views won't see a difference to
the previous behaviour, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19117 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-25 11:55:43 +00:00
Jérôme Duval
c4cc0591f1 fixed some warnings
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-23 14:05:40 +00:00
Axel Dörfler
304d592760 Made the keyboard device more resistant against any kind of error:
* Scancodes greater 255 are now handled correctly, and will no longer crash
  the input_server. This fixes bug #830.
* Use new (std:nothrow) instead of a simple new
* Now checks all allocations and appropriately handle failure
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18694 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-29 14:14:45 +00:00
Axel Dörfler
2bd9d1e3d8 Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18687 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-29 10:32:29 +00:00
Marcus Overhagen
0d9075c677 open() error is reported in errno
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18676 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-28 20:32:18 +00:00
Axel Dörfler
fafab8272d This should actually fix the bug a bit nicer (as it no longer prevents the mouse
from moving at all when moved slowly).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-24 09:37:16 +00:00
Stefano Ceccherini
b6ba23596d if the acceleration factor was more than 0, the mouse could only be moved every other pixel. Fixed (thanks to Jonathan Thompson for his help finding this). Axel, wouldn't it make more sense to move the acceleration computation to the input server, so it doesn't have to be implemented by every input device ?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18594 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-24 08:10:23 +00:00
Jérôme Duval
5f3c583050 moved definition of B_FIRST_REAL_TIME_PRIORITY to HaikuBuildCompatibility.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18467 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-09 09:53:10 +00:00
Jérôme Duval
48b8e27155 improved the library name map for haiku and host keeping the simpler name input_server
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18465 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-09 08:13:07 +00:00
Jérôme Duval
72cc02533e link input addon against /system/servers/input_server on non Haiku targets, map our input_server target to it
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-08 16:33:44 +00:00
Jérôme Duval
ade5efae04 added an input device addon for GeniusEasypen serial tablets
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17974 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-29 19:01:30 +00:00
Axel Dörfler
74ef162141 Slowed down mouse acceleration quite a bit, but also made sure the minimal
acceleration factor is 1 which wasn't the case before.
The defaults now feel pretty good over here.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17884 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-20 17:07:25 +00:00
Axel Dörfler
b7670df392 * The powers of two, revisited :-)
* Removed debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-16 07:15:38 +00:00
Axel Dörfler
42b505fba3 * Implemented mouse acceleration - it's not as smooth as on BeOS (your mileage
may differ), but I think it's definitely an improvement. This fixes bug #402.
* Since there now is acceleration, I reduced the mouse speed by half.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17850 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-15 20:32:12 +00:00
Axel Dörfler
61604e4875 I wanted to work on mouse acceleration, but this had to come first:
* No longer calls _RecursiveScan() in InitCheck() (but in the constructor instead).
* Fixed a bug when a new device was started: the new thread got a stack allocated
  structure pointer, but there were no handshake to make sure it was still valid.
* Now checks all BMessage allocation, as well as adding fields for success, and
  doesn't enqueue partial messages.
* Big refactoring and cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17845 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-15 16:53:09 +00:00
Jérôme Duval
23b47e0b5e now remap mouse buttons if the mouse driver doesn't remap itself
Remapping doesn't work on Haiku yet: it seems the mouse map isn't well updated for some unknown reason 
update license 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17843 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-14 21:24:14 +00:00
Axel Dörfler
099e443467 Minor cleanup and array orientation helper.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17805 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-12 22:16:33 +00:00
Axel Dörfler
642090fdc6 * ScreenCornerSelector is now a BControl and fully keyboard navigable.
* simplified drawing a bit, and got rid of those scary scale*() stuff (which also
  results in better looks). The monitor now looks like the one in Screen; I think
  it should either be a very reduced form or a very detailed form, but anything
  in between often looks just odd.
* It now also listens to B_MOUSE_DOWN incl. mouse tracking, not only to B_MOUSE_UP.
* Less flickering on state changes (and focus change).
* Loading settings no longer overwrites defaults missing from the settings.
* Renamed ScreenSaverSettings::GetBlankCorner() to BlankCorner(),
  LoadSettings() to Load(), GetState() to GetModuleState(), ....
* Some more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17783 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-09 16:03:16 +00:00
Axel Dörfler
1fa515a650 * Fixed use of ScreenSaverSettings::TimeFlags() - it's a flags field after
all, so it should be used like one.
* Fixed a memory leak because of incorrect BMessageRunner usage.
* Some corner rects were computed incorrectly (I did that earlier).
* Since either a file or a directory is watched, but never both at the same
  time, we only need to store one ref.
* Don't update the settings as long as there is no settings file.
* Fixed strange usage of watch_node() - not specifying a handler means that
  the message is sent to the preferred handler, a BLooper is also always a
  handler, and the message only should go there.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17773 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-07 21:29:04 +00:00
Axel Dörfler
41158aaf91 * Renamed the ScreenSaverPrefs class to the more Be-like ScreenSaverSettings.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17755 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-07 12:43:31 +00:00
Axel Dörfler
7cae4a1ee0 * Big time cleanup of the screen saver stuff, not yet finished yet, though.
Renamed lots of things, like ScreenSaverThread to ScreenSaverRunner,
  refactored code, etc. Much cleaner interfaces and code.
* Fixed a couple of bugs and in the add-on handling, especially some settings
  related bugs (ie. testing a screen saver will now use its latest settings,
  etc.).
* Correctly implemented DPMS support in ScreenSaverPrefs and the ScreenSaver
  preferences application - screen_blanker still ignores them, though.
* It's not yet font sensitive either.
* Changed the input_server add-on to not switch to the screen blanker immediately
  when it's in the "blank corner" - doesn't seem to work yet, though (only tested
  under Qemu).
* Correctly implemented the "preview" function (before, a screen saver would
  never know it rendered a preview).
* Evaluates the return value of BScreenSaver::StartSaver().
* The screen saver thread is no longer killed without notice - it's now
  always shut down properly.
* Made the code more robust against failure.
* Introduced some new bugs as well (the screen saver list view doesn't jump to
  the selection anymore, for some reason), those will be fixed later (as the
  remaining issues).
* Probably some more I forgot about.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17731 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-06 08:16:46 +00:00
Jérôme Duval
360e569a2c Patch from Momoziro.
Fixes highlighting bug in CannaIM's Kouhou window.
Changes windows look to better values


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17722 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-04 19:46:07 +00:00
Jérôme Duval
bbb7119577 beos compatible
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17691 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-01 17:37:48 +00:00
Jérôme Duval
ab61875fe6 TMDescView is now resized to preferred before computing other views positions
fixed bug #599


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-23 10:52:44 +00:00
Jérôme Duval
771b07b64c made team monitor resizable
fix build of TeamMonitorTest app


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17220 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-24 12:13:16 +00:00
Jérôme Duval
bb55c479b8 B_COLOR_8_BIT is deprecated
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17167 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-18 20:11:35 +00:00
Jérôme Duval
8a9866347d added checks for locking
also assigning the window field to null when quitting the window


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17128 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-13 20:26:45 +00:00
Jérôme Duval
f7f614034d better place the button Restart
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17109 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-12 14:20:39 +00:00
Jérôme Duval
f88e467c8a should better now :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-12 08:43:16 +00:00
Jérôme Duval
94a2752647 added a "Restart the Desktop" button, untested
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17086 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-11 16:51:16 +00:00
Axel Dörfler
1bad82578f The <Print-Screen> key is now ignored when the screen saver is running - this
should fix bug #456.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-10 23:29:36 +00:00
Axel Dörfler
cc5da1fe65 Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17065 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-10 23:16:06 +00:00
Marcus Overhagen
d323bbb26f Cleanup:
- made 'active' variable volatile
Bugfixes:
- fixed deletion of mouse_device from fDevices list when the object is deleted.
- removed deadlock from RemoveDevice
- call UnregisterDevice from inside RemoveDevice
- terminate devicer watcher thread on read error
- skip "serial" directory always
- close file handle when initializing device watcher thread fails


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-29 22:44:58 +00:00
Marcus Overhagen
dbb98f2b76 Cleanup:
- keyboard_device now frees device_ref.name by itself when it's deleted
- made 'active' variable volatile
Bugfixes:
- delete keyboard_device from fDevices list when the object is deleted.
- removed deadlock from RemoveDevice
- call UnregisterDevice from inside RemoveDevice
- terminate devicer watcher thread on read error


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16926 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-29 22:41:24 +00:00
Jérôme Duval
f0bac93530 completes fix for bug #155
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-19 17:06:49 +00:00
Jérôme Duval
d361f6fa3b added monitoring for input/keyboard/at, hope this fix bug #155
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-19 17:04:07 +00:00
Jérôme Duval
7be5a254fa it is dumb to open and close devices before starting them
hopefully fixed bug #150


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-12 22:37:39 +00:00
Marcus Overhagen
ca228cbfcb use the definitions from driver header file, instead of defining a second set of constants
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-12 12:08:51 +00:00
Jérôme Duval
a71a4d8199 fix bug #140
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16324 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 10:26:40 +00:00
Jérôme Duval
718a665ba9 fix some memory leaks (part of bug #140
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16322 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 10:13:43 +00:00