Commit Graph

197 Commits

Author SHA1 Message Date
czeidler
00670f08ef Reconnect imput server. 2012-01-22 15:30:15 +13:00
Michael Lotz
e791096b81 Fix unintentional change that broke input_server in safemode.
The change to this initial index for safemode was brought in with the
flat import of the package manager branch in 323b654 where presumably
more paths were used. With this value selecting either just safe mode
or disable user add-ons would lead to no input_server add-ons being
loaded at all, leading to a system without input.
2011-12-02 14:07:55 +01:00
Oliver Tappe
323b65468e Filtered flat import of Oliver's svn package management branch
Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
  deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
  <directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
  DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
  ~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.
2011-11-25 06:17:07 +01:00
François Revol
77697df4cf Remove leftover debug code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43038 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-31 20:14:16 +00:00
François Revol
0fa3181d95 Implemented the patch on in a different way.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43037 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-31 18:09:24 +00:00
Axel Dörfler
98e30c67df * Fixed style violation (tab before '{' that Jérôme already mentioned), and
merged the two ifs.
* Automatic white space cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-08 21:11:03 +00:00
Adrien Destugues
3eb02f08d9 Style fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42533 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-01 17:19:54 +00:00
Adrien Destugues
e1ac525ddf * Don't eat alt+space if there is only one input method available (the shortcut is meant to switch input methods)
Makes it useable in applications and less confusing. Fixes .


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-07-31 14:45:55 +00:00
Michael Lotz
b617e8daff A blast from the past: r15048 from way back removed the wrong boolean parameter
causing the message to be sent with a timeout of "true" (getting converted to 1)
instead of the intended 0 meaning no/infinite timeout. This caused the message
sending to be aborted due to the timeout if it was blocking on a full port for
example. Since the return value is never checked noone noticed.
It's possible that this was the cause of some lost input messages (mouse,
keyboard) when the system was under heavy enough load for either the port heap
to be exhausted (unlikely) or the input_server <-> app_server port to run full
(quite possible).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42271 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-20 22:24:36 +00:00
Jonas Sundström
46f4e9db27 Useless type qualifier on return type. CID 5666.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40638 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-23 04:38:57 +00:00
Jonas Sundström
93e53019bf Missing InitCheck. Error checking stale status variable. CID 2962.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40637 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-23 04:35:37 +00:00
Oliver Tappe
915a7b8c24 Make BObjectList<> publically available:
* cleaned up ObjectList.h
* switched several uses of new() to new(std::nothrow)
* moved ugly AsBList() hack into BObjectList<>::Private class and
  adjusted all callers accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-20 12:09:16 +00:00
Ingo Weinhold
078e1762a3 AddOnManager::MessageReceived(): ERROR() -> TRACE()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39768 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-08 18:34:54 +00:00
Stephan Aßmus
ea8a421c0c Run the AddOnManager after having loaded add-ons on the InputServer
thread. After fixing the internal locking of AddOnMonitorHandler in
r38235, running the AddOnManager before scanning add-ons could lead
to a dead-lock in case devices appeared while the input_server was
still initializing. This hopefully fixes  and possibly also
. I've tested in both qemu and on real hardware (quad-core with
3 mice, one tablet and 3 keyboards connected). I've also tested
hot-plugging devices, which still works as expected. The problem may
have already been fixed in the preceding changeset, by elliminating
an extra involved looper. Since node monitor messages were actually
received on the wrong looper, using the looper lock in AddOnManager
did not have the intended effects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39742 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-05 15:10:50 +00:00
Stephan Aßmus
509a3787b1 Eliminate the second add-on monitor looper by inheriting AddOnManger
from AddOnMonitor. This solves a concurrency problem in the AddOnMonitorHandler
implementation which called into AddOnManager private methods on the wrong
looper thread without locking. Would have corrupted memory when unplugging
input devices during input_server initialization (so normally not encountered).
The code paths for adding devices were locking already, since those can be
called from other threads as well and this was anticipated.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39741 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-05 15:03:11 +00:00
Stephan Aßmus
1f1db8cf7e Brought the public methods in declaration order.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39735 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-05 11:54:38 +00:00
Axel Dörfler
2c49465329 * Removed the at_kbd_io and AT keyboard stuff; this is now done within the PS/2
driver, and that driver is using the raw_key_info structure as well.
* Renamed kb_mouse_driver.h to keyboard_mouse_driver.h.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36267 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-14 19:19:14 +00:00
Axel Dörfler
2f0568369b * Added missing include dependency from input_server to SystemKeymap.h.
* Removed superfluous package rules.
* 80 character per line cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36257 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-14 12:47:18 +00:00
Axel Dörfler
efb527ca96 * Removed BeOS drop-in support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 15:07:49 +00:00
Axel Dörfler
f0f0a2d136 * Removed unnecessary defines.
* Removed COMPILE_FOR_R5 support.
* No need for the distribution files any longer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 15:04:43 +00:00
Jérôme Duval
53d3fc817d Patch from hiron ticket : add raw_char field for generated B_KEY_DOWN messages. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34180 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-21 23:42:54 +00:00
Axel Dörfler
3734adc5b3 * Build fix of the timezone/keymap move. Sorry!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33985 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-10 14:21:27 +00:00
Axel Dörfler
a0439d88df * Adjusted thread priorities of several system services based on a mail from
Mikhail Panasyuk: since worker threads often end up with B_NORMAL_PRIORITY,
  it might be a good idea to give system threads a higher priority.
* Minor cleanup (mostly automatic whitespace).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33961 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-09 15:25:48 +00:00
Axel Dörfler
0a9f301a59 * Fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33959 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-09 11:40:02 +00:00
Brecht Machiels
926e63c885 * added click to focus mouse mode; right-click for bring-to-front and send-to-back
(might cause some regressions in FFM)
* made accept first click user configurable
* updated the Mouse preflet to use the layout kit
* removed the warp and instant warp modes from the Mouse preflet
* changed internal representation of mouse modes (warp modes moved)
* coding style fixes



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33732 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-22 21:10:19 +00:00
Michael Lotz
156b8d5d2d * Initialize member variables.
* Remove some unused members.
* Avoid initializing the mouse position to non-integer coordinates.
* The frame right/bottom are width/height - 1.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32979 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-07 01:37:22 +00:00
Axel Dörfler
4d365bbed9 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31391 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-03 12:59:56 +00:00
Stephan Aßmus
b037500155 Patch by Shinta: The key code was misnamed. Thanks a lot!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-03 08:32:17 +00:00
Ingo Weinhold
4fba3522e0 * Removed src/kits/tracker/OpenHashTable.h. The shared version in
headers/private/shared is newer, though with small interface changes.
* Removed the unnecessary Debug.h include in
  headers/private/shared/ObjectList.h.
* Adjusted sources using these headers, mostly by adding missing includes.
* Lots of automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30123 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-11 21:24:32 +00:00
François Revol
e2238bd923 - fixed hardcoded color in Deskbar replicant.
- fixed transparent pixels in the icon. This could make use of an HVIF one :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-05 11:02:38 +00:00
Stephan Aßmus
c0b6b0dff6 * Refactored _SanitizeEvents() a bit to remove small bits of duplicate code.
* Round the mouse coordinate to be compatible with BeOS behavior. I know that
  in WonderBrush, I had to extract the fractional coords using the be:tablet_x
  and y fields. This may actually be a better fix for , now that we know
  what caused it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29317 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-24 20:13:49 +00:00
Axel Dörfler
01b178700f * The input_server now updates its internal state only from the messages that
actually made it through (ie. after filtering).
* This should fix filters that change the current mouse position to work as
  expected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29135 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-04 23:37:10 +00:00
Jérôme Duval
2bbb828870 added get_modifier_key() as proposed by Olivier Cortes. Thanks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-14 14:43:49 +00:00
Jérôme Duval
dc7290d08d fix noticed by Olivier Cortes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28805 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-13 12:35:54 +00:00
Stephan Aßmus
393f282c79 * Mark InputDeviceListItems only as running if calling Start() for the
device returned B_OK.
* In the InputServer destructor, don't check the fAddOnManager pointer,
  but check the success of calling Lock() on it instead, which should
  be much safer.
* In StartStopDevices(), really start or stop all published devices for
  the given BInputServerDevice, not only the first one found. Simplify
  the check whether anything needs to be done.
* Change a bit the return codes of StartStopDevices(). Especially the
  version that's supposed to start or stop all devices will still try
  to do it for the rest of them.
* Removed no longer needed _FindInputDeviceListItem().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-27 22:19:55 +00:00
Stephan Aßmus
dae439fe60 Init the ref_count with 1, since the first AddPath() would leave it
at 0. A single AddPath()+RemovePath() would therefore leave a not
anymore needed path_entry(), while a AddPath()+AddPath()+RemovePath()
would remove/delete the path_entry while it was actually still used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28349 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-27 16:44:58 +00:00
Stephan Aßmus
0d2fb32f12 As pointed out by Axel, this TODO is invalid.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28341 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-27 10:55:41 +00:00
Stephan Aßmus
740d899004 * InputDeviceListItem::fDevice was not maintaining it's own memory for the
device path, but instead pointing to memory owned by some device addon
  instance.
* Added TODO in the AddOnManager init code about a possible race condition
  which I have not varified yet.
* Check the return code of BList::RemoveItem() before deleting the item...
  pure defensive programming.
* For the time being, print a warning into the syslog when a device name is
  registered twice.
* When failing to Unflatten() an event, don't continue in the code after
  deleting it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28319 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 21:33:46 +00:00
Stephan Aßmus
1a1a4f955c * Updated the license header.
* Use new(nothrow) to allocate the MethodReplicant.
* fSignature needs to be free()d, not deleted.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28318 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 21:29:35 +00:00
Stephan Aßmus
944bc06060 * The way subdirectories for the input_server add-ons were defined was a bit
weird.
* Set fHandler to NULL in _UnregisterAddOns(), just in case it is called
  twice (which it probably never is... but be defensive).
* If a B_NODE_MONITOR message does not contain all the necessary fields,
  drop into the debugger when compiling in DEBUG mode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28317 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 21:28:21 +00:00
Stephan Aßmus
2d265d2a5b * Removed some no longer used testing code.
* Fixed unloading the add-on image twice in error case of failing to
  add the add-on info to the list.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28307 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 09:20:00 +00:00
Axel Dörfler
ab869c3c27 * The ref_count member should definitely be initialized - thanks Stefano!
* This might fix bug .


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28277 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-22 09:04:41 +00:00
Axel Dörfler
23debb05d0 * Rewrote InputServerDevice.h header.
* Renamed _BDeviceAddOn_ to DeviceAddOn, and put it into the BPrivate namespace.
* Moved the DeviceManager functionality into the AddOnManager - this also
  solves a locking issue, as BInputServerDevice::Control() was called in the
  context of the DeviceManager before.
* The AddOnManager now uses the BPathMonitor to monitor the devices that
  BInputServerDevices ask for - this greatly simplifies the code.
* Got rid of TList.h, and use ObjectList.h instead.
* Added PathList class that has a list of paths with reference count, used by
  DeviceAddOn and the AddOnManager.
* DeviceAddOn got an actual implementation that lives in InputServerDevice.cpp.
* Added an experimental BInputServerDevice::AddDevices() that could be used
  instead of recursing over devices manually. It replaces the functionality
  that was found in the DeviceManager before (this was done implicitely for
  all monitored devices).
* Greatly cleaned up and simplified the AddOnManager.
* Also fixed lots of potential errors/leaks when things go wrong.
* Removed the extra locker in AddOnManager - its BLooper lock is now used
  instead.
* Replaced PRINT()/PRINTERR() macros in the AddOnManager with TRACE(), and
  ERROR(), both now use debug_printf().
* Hopefully this fixes the problem that I don't have keyboard under VirtualBox
  from time to time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-19 15:48:34 +00:00
Axel Dörfler
8f2be9ef82 * Cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28229 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-18 13:53:03 +00:00
Stephan Aßmus
18510f899b Added input_server icon by zuMi. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28041 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-13 15:52:05 +00:00
Jérôme Duval
212426b00e fix warnings
white space cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27311 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-03 20:58:19 +00:00
Jérôme Duval
c08e99ef40 print errors when starting devices
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27308 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-03 19:12:18 +00:00
Jérôme Duval
65e6fe82ad better check the size of the chars table for keymaps. this avoids crashing in .
dunno why the keymap is invalid though


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-24 12:28:27 +00:00
Jérôme Duval
97686ecc7a also sanitize events added by filters, to be checked with methods too.
this fixes bug 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27162 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 22:30:11 +00:00
Jérôme Duval
3658735727 fDeviceAddons wasn't maintained correctly. this fixes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27092 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 23:07:08 +00:00