Commit Graph

132 Commits

Author SHA1 Message Date
Stephan Aßmus
7ce678aa5f * implement conversion of absolute mouse coordinates (0..1) in device
messages to normal screen coordinates



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21274 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-29 20:21:33 +00:00
Jérôme Duval
c0d5509623 remove filters and methods from their lists when unregistering
fixes bug #1215


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21106 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-10 19:54:18 +00:00
Jérôme Duval
3499cb7591 now creates the monitored directories if they don't exist (0755)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20984 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-02 19:05:57 +00:00
Jérôme Duval
48cc07ffa7 added a commented option to activate input_server serial log
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20956 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-01 18:34:45 +00:00
Jérôme Duval
68ed0a8e97 get rid of the BHandler used in DeviceManager
DeviceManager wasn't run


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20915 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-30 09:50:12 +00:00
Jérôme Duval
1cafa90eda code style
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20704 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-15 14:17:02 +00:00
Axel Dörfler
2617d83e76 Damn, forgot to include these two in r19968. This should fix the build again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19973 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-26 16:48:02 +00:00
Axel Dörfler
2ca64e4886 Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19712 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-05 19:53:45 +00:00
Ryan Leavengood
d6ead04161 Removed some debugging lines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-14 05:20:18 +00:00
Ryan Leavengood
252f476782 Added some needed stdio.h includes. I don't know what magic was used to compile
these for other people, but they wouldn't compile for me when building the
app_server test environment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-13 00:15:56 +00:00
Ryan Leavengood
499aacdd0a Fixed bugs #177 and #180 by adding code to notify the input_server that the
system is shutting down.

For the protocol between the Registrar and input_server I decided to just
re-use the message constant already defined in the input server headers
(SYSTEM_SHUTTING_DOWN.)

The code in the input server to notify the InputServerDevices about the
shutdown was pretty trivial.

For the code in the Registrar I'll let some gurus review it to make sure it
fits in with the rest of the code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19289 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-15 08:19:12 +00:00
Axel Dörfler
158893b903 The input_server now removes all B_INPUT_METHOD_EVENTS when the target view is
not input method aware.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19147 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-29 19:12:29 +00:00
Axel Dörfler
b735e46de3 Extended input method protocol a bit: you can now set "be:inline_only" to true, which
means that no bottomline window will be opened in case the current view is not input
method aware.
Instead, only the confirmed B_INPUT_METHOD_CHANGE event will be translated to a message
the view will understand - this message must be part of the event in the "be:translated"
member.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-25 10:45:45 +00:00
Axel Dörfler
8a93edb60c Made all server version and signatures consistent, and thus closing bug #909.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19092 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-22 17:56:02 +00:00
Axel Dörfler
37ec4f04fe * Cleanup of signatures and version infos - this is part of a fix to bug #909.
I've done all preferences apps for now, and some related.
* Some other related cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-22 14:55:44 +00:00
Axel Dörfler
7ee49d9f64 Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18696 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-29 15:04:42 +00:00
Jérôme Duval
e2d5e00981 applied a patch from barber for bug #661. Thanks! This fixes a weird behavior when using the menu
minor cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18093 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-07-10 22:12:40 +00:00
Jérôme Duval
8703696801 input_server saves its settings on change, sending itself a 'Save' request message
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18052 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-07-07 15:38:53 +00:00
Axel Dörfler
43d3560b25 * As the generated SystemKeymap source is used as a header, I renamed the
generated file from SystemKeymap.cpp to SystemKeymap.h.
* The keymap was even compiled into the input_server twice, as it was also
  listed as source file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17711 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-03 15:33:26 +00:00
Axel Dörfler
c8467d6ba1 * Further improved error handling in class Keymap.
* Improved header output, it now looks a lot nicer.
* Fixed style issues of that header, too: replaced "s" prefix with the
  correct "k" prefix.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-01 13:06:40 +00:00
Michael Lotz
bdbd1cb441 Removing the USING_MESSAGE4 define.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-11 18:06:46 +00:00
Jérôme Duval
059b715043 Patch from barber (part of bug #141):
better handling of method events


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16666 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-08 23:05:25 +00:00
Jérôme Duval
f764a491bb hopefully patched some of the problems reported by barber <bxi07354@nifty.ne.jp> on bug #141
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-28 15:54:20 +00:00
Marcus Overhagen
fbe9b0b6eb This fixes bug #149.
Input server now saves keyboard typematic settings whenever they are modified,
instead of wating until it is shutdown (which never happens, either the
system will crash, or the input_server will stay active after a normal shut down)
Same problems might apply to mouse and keymap settings.
Input server shutdown handling should be reviewed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-13 17:35:05 +00:00
Jérôme Duval
36077365d1 also copy modifiers and state in SanitizeEvents as we need them there
change MethodizeEvents to actually handle the method queue


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16347 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-11 15:11:28 +00:00
Jérôme Duval
7d0b5dc160 fix debug build
avoid allocating a BMessage in InitKeyboardMouse, as reported in bug #140


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16346 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-11 12:30:36 +00:00
Jérôme Duval
10214ec48f hopefully taken B_INPUT_METHOD_STOPPED into account
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16325 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 10:45:08 +00:00
Jérôme Duval
c3ea345d20 starting a running device or stopping a stopped device isn't allowed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-28 20:41:16 +00:00
Jérôme Duval
0b64aa6472 hopefully fixed iroster behavior
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15199 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-28 17:14:54 +00:00
Axel Dörfler
26b02ddc80 The input_server is now notified when the screen resolution is changed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-26 16:22:06 +00:00
Axel Dörfler
4c57bd573e Fix for compilation with the new messaging code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15048 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 17:20:19 +00:00
Axel Dörfler
7a67c93f8e Turns out B_RELEASE_ALL just works as expected - it was a deadlock by design; when the
cursor thread didn't call acquire_sem() fast enough, it would never get released by
B_RELEASE_ALL (as that only releases all waiting threads), and thus, waited forever
for the semaphore to be released again.
On the other side, the input_server didn't call release_sem() anymore, since the
cursor thread still didn't read out the data after the last release...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15014 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-18 12:04:28 +00:00
Axel Dörfler
1b120ea94a Turns out there were a couple of problems:
* RootLayer still set the mouse cursor...
* mixed up "x" and "y" in the cursor thread
* but that didn't get noticed, as B_RELEASE_ALL doesn't seem to work
  (will look into that next)!

The cursor finally works as good as expected in Qemu :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15013 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-18 11:50:34 +00:00
Axel Dörfler
f759822327 * the new input event dispatcher is now actually used, although it doesn't
distribute any messages to the clients yet.
* removed the working thread from RootLayer - for now, its event handlers are
  still called using input filters in the new event dispatcher, though (to
  get things started).
* ServerApp is now using a BMessenger to identify its client, and no longer
  stores the port/token separately.
* the input_server handshake is a bit simpler now, as it can now just reply
  to the app_server message, removed unused code from ServerProtocol.h
* calmed down the MultiLocker (it always printed thread statistics on startup,
  because it's compiled in debug mode).
* removed the cursor thread stuff from AppServer.cpp
* the new event dispatcher now uses a cursor thread when supported (only in
  native mode, not in the test environment), although it improves cursor
  movement under Qemu, the effect is not as good as expected - this might
  need some more investigations (might just be a thread priority problem).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15012 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-18 11:30:06 +00:00
Ingo Weinhold
3d5caf598e Fixed gcc 4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14973 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-16 20:56:35 +00:00
Axel Dörfler
128ddaa3e3 Some work on the input_server:
* Rewrote event handling: instead of writing every single device message to
  the event port, they are just queued in a list, and the event loop is only
  notified if necessary (ie. if a notification has been sent already, new
  events are just queued up until the input_server found the time to process
  them).
* This also fixed a big memory leak: every message processed by EnqueueDeviceMessage()
  (IOW every key or mouse event) was leaked!
* no longer abuses gInputMethodListLocker to lock the method event queue
  (it now uses the standard event queue lock).
* removed the completely superfluous, weird and decelerating event caching mechanism
* tried to find a better distribution of work between _SanitizeEvents(),
  _MethodizeEvents(), and _DispatchEvents().
* HandleSetMousePosition() now only does what it's supposed to do (this currently
  causes the mouse to jump at the start, though).
* now uses the "Message4" for message sending if available.
* fixed "kb_mouse_settings.h" to include all headers it needs.
* some more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14966 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-16 17:25:58 +00:00
Axel Dörfler
6c17d02551 * Introduced a new handshake between input_server and app_server, and some
temporary handling code in the app_server.
* RootLayer no longer creates the input_server messaging port - this is now
  the responsibility of the input_server.
* Moved AS_CREATE_[OFFSCREEN_]WINDOW from ServerApp::_MessageLooper() to
  _DispatchMessage().
* The RootLayer thread is now started as soon as the input_server is there.
* removed or disabled any input_server stuff in the AppServer class.
* removed old message commmands to the app_server.
* Removed the R5_CURSOR_COMM and HAIKU_APPSERVER_COMM definitions: the
  input_server is now automatically built correctly depending on the target.
* InputServer::EventLoop() plays now safe and checks for error conditions.
* InputServer::EnqueueDeviceMessage() seems to leak memory, added TODO about
  this.
* InputServer event loop messaging uses ports for inner-app communication - why?
* The InputServer event loop thread is no longer killed on exit, it just quits
  when its port is gone.
* Minor cleanup in input_server.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 19:59:53 +00:00
Axel Dörfler
a512a89b27 Fixed some memory leaks, fChars was never freed.
Now uses (nothrow) for fChars and checks if the allocation succeeded.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 15:50:42 +00:00
Axel Dörfler
9514d2e5e6 * introduced a global gInputServer object, so that you don't need to cast the
be_app object anymore.
* fixed some missing locks for the input device list.
* moved the input device list into the InputServer object - didn't make a lot
  of sense the way it was done before. Also moved registering/unregistering
  into the InputerServer class.
* Made the InputDeviceListItem class a bit more useful and encapsulated.
* cleanup, removed empty function documentation stubs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14946 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 15:35:36 +00:00
Ingo Weinhold
ca9e5772c3 * Reintroduced third LinkAgainst parameter <mapLibs>, defaulting to true.
Library names are now mapped for all targets but "host" (not only for
  "haiku") -- added one more level of indirection to achieve that.
  (TARGET_LIBRARY_NAME_MAP -> *_LIBRARY_NAME_MAP_*).
* Renamed build/HaikuBuildCompatibility.h to BeOSBuildCompatibility.h
  (auto-included when compiling something that uses the Be API for platform
  "host" on anon-BeOS platform), and introduced build/HaikuBuildCompatibility.h,
  which can be included when compiling something that can be built for both,
  Haiku and BeOS compatible platforms.
* Introduced libhaikucompat.a, a library that adds a few functions existing
  under Haiku, but not under BeOS.
* New rule AddSubDirSupportedPlatforms.
* Renamed libopenbeos.so to libbe_haiku.so.
* Introduced new target platform "libbe_test", which is basically equivalent
  to a BeOS compatible host platform target, with the exception, that instead
  of the host platform's libbe.so a special build of Haiku's libbe.so
  (libbe_haiku.so (formerly known as libopenbeos.so)) is used. Furthermore
  Haiku's public app, interface, storage, and support kit headers are used
  when compiling. This replaces the less nice way in which the test app server
  and applications for this test environment were built.
  When building for platform "libbe_test", the library name "be" is
  autotranslated to "libbe_haiku.so". Thus most applications don't need
  special fiddling when them building them for the app server test environment;
  usually an "AddSubDirSupportedPlatforms libbe_test ;" will suffice.
* Reduced the dependencies of <syscalls.h> and fixed problems caused by this
  (e.g. source files not including the needed headers directly).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14749 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 16:07:25 +00:00
Axel Dörfler
ec12c6fe6f Don't let ifdef's confuse the editor's function lookup.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14693 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 15:07:31 +00:00
Ingo Weinhold
338b8dc301 Merged changes from branch build_system_redesign at revision 14573.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 16:27:43 +00:00
Adi Oanca
3e5b79a7c6 Send BMessages to Haiku's app_server instead of PortLink ones. This is untested, but should work fine.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-25 18:44:48 +00:00
Jérôme Duval
c495f81aab added some debug PRINT
inited fChars to null


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14326 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-06 15:43:21 +00:00
Stephan Aßmus
e8a110090c make sure the mouse settings are initialized with default values
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13695 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-16 14:33:18 +00:00
Jérôme Duval
b39b6ee51c DispatchEvent is now using when field from input message instead of real_time_clock()
Also watchs B_UNMAPPED_KEY_DOWN for Alt+Space (input method change)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-13 09:48:35 +00:00
Axel Dörfler
dd10337fd0 Renamed BAppServerLink to AppServerLink, BPortLink to PortLink, LinkMsgReader
to LinkReceiver, LinkMsgSender to LinkSender, and put everything into the
BPrivate namespace.
Made AppServerLink a cheap object - it will use the applications receiver/sender
and not create its own buffers.
Fixed broken communication stuff here and there (mostly Font.cpp).
Put the newly introduced set|get_system_colors() into the BPrivate namespace -
please don't introduce private functions into the public namespace!!!
Also fixed their broken communication use, as Darkwyrm obviously forgot about
it again: the sequence Flush(); GetNextMessage() without error checking is
purely wrong and can make the app hang and/or crash! :-)
Other minor cleanup.
The input_server used some test mode with the haiku build target which is
probably wrong.
Hopefully I did not forget anything this time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13128 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-14 21:28:56 +00:00
Stephan Aßmus
f571c4aee6 fixed typo
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12616 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-10 11:30:17 +00:00
Jérôme Duval
1f04728a75 Reworked different build modes
Uncomment in Jamfile "#APPSERVER_TEST_MODE = 1 ;" to test app_server with input_server
Uncomment in InputServer.h "//#define R5_CURSOR_COMM" to enable cursor comm when appserver BPortlink comm is used
Default mode is R5 comm if TARGET != haiku
and appserver BPortLink comm when TARGET = haiku

For APPSERVER_TEST_MODE, make sure to change the ViewInputDevice path in AddOnManager.cpp
To test with app_server, enable LaunchCursorThread() in AppServer.cpp and uncomment "#define INPUTSERVER_TEST_MODE 1" in ViewHWInterface.cpp
Also make sure to change the input_server path in AppServer.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-28 13:47:59 +00:00
Michael Lotz
fd5ac83a1a Use one BPortLink (fAppServerLink) instead of always creating a new one to send events to the app_server.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-17 12:27:43 +00:00