Commit Graph

39533 Commits

Author SHA1 Message Date
Alexandre Deckner
596bb6891a * Finally rewrote the filthy, busy-looping, mouse tracking in Tracker.
The new asynchronous tracking doesn't lock the view and makes desktop 
replicants happy while clicking and dragging around. Fixes #880, #7241 
and certainly other tickets, that i will revisit, about refresh locks 
on the desktop or mouse related bugs. Based on a reusable MessageFilter and the 
recent B_MOUSE_IDLE message. Some parts are ported from the old code
and could use further simplification.

There should be no intentional user fonctional change, except: 
- slightly bigger threshold radius, shorter duration thresholds
 (= 1.0 x the system-wide doubleclick setting)
- not reimplemented: quickening threshold when holding shift while dragging
 a pose over a destination pose.

Some parts are ported from the old code and could use further simplification.
There is one known minor regression with autoscrolling while 
rect-selecting but that will be better fixed with some changes to the 
autoscroll code. Will address that ASAP. As for the unknown regressions, 
please test :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 21:12:14 +00:00
Michael Lotz
233d1dc479 Implement variable joystick mode in the JoystickProtocolHandler. It supports
both, variable and extended joystick mode, using the same mechanism of mimicing
the extended_joystick structure with the variable one if required. The mode
used depends on the support flag coming in from BJoystick (currently off), so
with this commit the behaviour doesn't change. I'm going to flip that switch
next though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 21:11:38 +00:00
Axel Dörfler
3f953a72ff * Fixed missing initialization of fIsVesa, which should fix #7588.
+alpha


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41890 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 21:06:08 +00:00
Michael Lotz
e0f0271ae6 Use the appropriate initialize*() method instead of setting up the structure
manually.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 20:55:14 +00:00
Michael Lotz
34f0d87a9d Add initialize[_to_extended_joystick]() methods to variable_joystick. With those
methods the members are populated, the flat data size is calcualted, the data
buffer is allocated and the convenience pointers are set up automatically. With
initialize() an arbitrary configuration can be created, with
initialize_to_extended_joystick() a configuration is created that exactly
matches the data structure of the extended_joystick struct.
Having them here makes it easy to use the structure from a driver as well
without the need to set up everything manually.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 20:54:05 +00:00
Axel Dörfler
497beb0e26 * Fixed build, and therefore finally fixes #6317 again :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 20:38:38 +00:00
Michael Lotz
6e0cca2f96 * Remove the JoystickPrivate.h again and move the variable_joystick structure
into joystick_driver.h as it is convenient to have also on the driver side.
* Added comments explaining the data structure and use case of the structure.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 19:48:16 +00:00
Michael Lotz
ab1763688f * Replace the fixed size extended_joystick structure with a variably sized one
inside BJoystick.
* Add joystick_module_info flag to communicate support for variably sized reads.
* The variably sized data structure is set up to describe either the actual
  amount of data, when variably sized reads are supported by the driver, or it
  is set up so that it exactly matches the data layout of the extended_joystick
  structure. This allows us to support both as input data, while only needing to
  care about a single format inside BJoystick. Convenience pointers allow the
  data to be retrieved without additional overhead or extra logic.
* Add some sanity checks and ensure some boundaries when dealing reading data
  from the variably sized structure (as there might not be any buttons, hats,
  axis at all now).
* Ensure that the extended_joystick structure doesn't change in size due to
  padding by making it _PACKED (it wasn't padded though).

This is still supposed to work exactly as before. However, it opens up the
possibility to actually support arbitrary controllers with arbitrary axis, hat
and button counts. It therefore allows to actually deliver what the BJoystick
API was designed to handle all along.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41885 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 18:33:43 +00:00
Michael Lotz
660fe6bca9 * Make use of the new BJoystick::GetButtonValues() so any number of buttons can
be retrieved. I think the fixed layout will actually make it impossible to see
  anything beyond the 9th button however... The coding style of this app is,
  different, to say the least and I didn't really bother fixing it up right now,
  so the changes just mimic what's there.
* Some automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 15:55:50 +00:00
Michael Lotz
4b5bcc6684 Introduce a BJoystick::GetButtonValues() function that aligns with the other
Get*Values() functions but retrieves an arbitrary amount of button states using
a boolean array. This overcomes the 32 button limitation on the API side. Right
now the function does simply set the first 32 states from the button bitmap, as
the BJoystick to driver interface hasn't been adapted yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 15:40:31 +00:00
Stephan Aßmus
f3997b74b3 Applied patch by Pete Goodeve (with small coding style corrections)
which fixes vertical BSliders. (ticket #7548) Thanks a bunch!
+alpha


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 15:39:34 +00:00
Ingo Weinhold
9536ec0297 Reimplemented the gdb stub support for the 'g' command (read registers):
* Added an arch_debug_gdb_get_registers() interface that is supposed to provide
  the register values in the format expected by gdb and implemented it for x86.
* Reimplemented gdb_regreply() to use that. Also made it buffer overflow safe.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 15:35:10 +00:00
Michael Lotz
bb2420a474 Remove two unimplemented private functions. Since their signature was changed
already anyway (as compared to the original BeOS ones) this won't introduce any
missing symbols.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41879 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 13:26:22 +00:00
Michael Lotz
1147fabd67 Move function definitions to match their declaration order. Also move some
declarations to group them more logically. No functional changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 12:45:35 +00:00
Philippe Houdoin
fccb048765 Fixed gcc2 build (sorry).
Plus one forgotten small style fix.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41877 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 12:39:51 +00:00
Michael Lotz
2682d2fbdd * Return early when opening the device failed and just return B_ERROR as
documented in the BeBook. Sadly the success return is specified as "a positive
  integer", so I didn't change it to B_OK.
* We actually want non-blocking mode, so don't reset the O_NONBLOCK flag. It was
  ignored before anyway though, so this doesn't change anything.
* The legacy buttons 1 and 2 are in the pressed state when false, so initialize
  them to true instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41876 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 12:15:46 +00:00
Michael Lotz
30e429b4e4 I was mislead by the legacy joystick structure data type for the axis values
(which is uint32), but the legacy BJoystick axis values are just the same int16
as the ones in extended mode, so nothing has to be done besides assigning them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 11:58:09 +00:00
Philippe Houdoin
1291377a6e Applied patch by Pete Goodeve, which adds multi-ports support to usb_midi driver.
Fixed some coding style and a few sanity checks where it make sense.

This driver code is not in a good shape and needs a wide cleanup.
unfortunatly, I still don't have any device to test with, so I can't do that anytime soon.
Intead of letting his patch collecting dust since 3 months (my bad),
I think it's better the multi-port support gets at least more exposure than
just Pete's hardware.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41874 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 10:30:03 +00:00
Alexander von Gluck IV
5d6dcc0685 remove AtomInit.. breaks radeon_hd build due to missing return and I have a while until I can implement it fully
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-02 23:05:24 +00:00
Alexander von Gluck IV
1dac446909 added scale update locking register; remove leftover intel hack thats not needed on Radeon; fix gcc4 warning on card model comparison
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-02 22:50:28 +00:00
Scott McCreary
b6478330e3 Updated ruby to a build which has support for readline. Commented out the symlink for friss until it gets figured out
and fixed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-02 16:08:15 +00:00
Michael Lotz
464e0351d3 * Add a BJoystick::RescanDevices() public function. It allows the BJoystick
to be updated with newly plugged in devices without the need to recreate a
  BJoystick object.
* Do an initial (re-)scan on object creation instead of always scanning in
  CountDevices() and by extension GetDeviceName().
* This makes CountDevices() and GetDeviceName() stable with regards to the
  device list, so that an enumerating application doesn't suddenly get more/less
  devices than it might expect.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-02 15:10:31 +00:00
Michael Lotz
a00ac73989 Ensure that a GetDeviceName() call triggers a ScanDevices() as well, as it can
be called without calling CountDevices().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-02 13:04:14 +00:00
Michael Lotz
393ca9a124 Cleanup of the _BJoystickTweaker:
* Include sorting, header style, macro naming, variable naming, spacing, ...
* Some simplifications, early returns and the like.
* The device name list items were allocated with new but deleted with free. The
  whole private BJoystick list being modified by a friend class is dubious
  though and should be reworked. Ideally node monitoring would be implemented
  so that the list can be re-populated on demand instead of scanning through
  every time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41868 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-02 12:42:18 +00:00
Philippe Houdoin
258cffcde2 Fix gcc4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41867 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-02 08:13:31 +00:00
Ryan Leavengood
de6ea73bce Update WebPositive to a build made on a gcc4 r1a3 RC.
+alpha3


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-02 04:26:42 +00:00
Michael Lotz
5052c5b678 Make adjustments to the JoystickProtocolHandler so that it works in accordance
with the BJoystick requirements:

* Make the Read() non-blocking. This is required as BJoystick is a polling
  interface. A single current state is used that is updated by a separate thread
  on report arrival. The thread is spawned as soon as the ProtocolHandler is
  opened for the first time (and quit at the first wait return after the
  ProtocolHandler is closed). With this we can simply return the current state
  on read.
* Remove the ring buffer as it was not needed in the first place. This also
  happens to solve the problem of sharing a JoystickProtocolHandler. Before,
  concurrent reads would queue up the same result multiple times in the ring
  buffer and then return stale data on the next update.

Solves most of #7629.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-02 00:56:18 +00:00
Michael Lotz
23249681ab Since we never actually read more than one mouse_movement at a time and we only
ever wait for reports on demand, there's no need for buffering at all.
This removes some unnecessary copying and ring buffer overhead, the ring buffer
will now in fact not be created at all.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-01 23:34:03 +00:00
Ryan Leavengood
4787582ad1 Add zuMi's Shortcuts icon. Thanks for the suggestion diver.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-01 21:37:34 +00:00
Scott McCreary
53592f6036 Added new gcc2 and gcc4 OptionalPackages for FRiSS, fixed some more typos.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41862 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-01 20:44:07 +00:00
Alexander von Gluck IV
eb1b3e422f implement AtomBios CailRead/WriteFBData callbacks
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-01 18:34:13 +00:00
Alexander von Gluck IV
3fcaf0d61c remove unneeded orphan function declaration for AllocateFB
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41859 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-01 14:55:40 +00:00
Alexander von Gluck IV
057f5d1d50 GCC2 build fixes on radeon_hd driver
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-01 14:39:15 +00:00
Scott McCreary
4d0944c90d Updated KeymapSwitcher OptionalPackages for gcc2 and gcc4 alpha3, built by S.Zharski
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-31 22:10:11 +00:00
Scott McCreary
22d447acdc Updated gcc2 Ruby OptionalPackage for alpha3.
+alpha3


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-31 19:37:45 +00:00
Joachim Seemer
5719d5c9d6 Added LanguageFlags.rdef with the Esperanto flag data. Now Axel can play with it, see #7614. Thanks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41854 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-31 17:12:10 +00:00
Joachim Seemer
547a76feb5 Removed the Esperanto flag again from the rdef, as it's not country, as correctly pointed out by Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-31 15:45:41 +00:00
Michael Lotz
f202fdc6ed * Add Jamfiles to allow building the stickit sample code. It allows testing of
the BJoystick API and joystick drivers.
* Also fix a few warnings in the code that were caused by using NULL instead of
  0 for BWindow/BView flags.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41852 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-31 02:33:28 +00:00
Michael Lotz
f46bc7f19e * Add a JoystickProtocolHandler to usb_hid that supports the BJoystick protocol.
This includes input scaling, so the resulting input ranges should always match
  the ones of the BJoystick data (hence no calibration should be required).
* It supports joysticks, gamepads and multi-axis controllers. I've only tested
  it with a Microsoft SideWinder Gamepad Pro so far, which now works as expected
  with stickit.
* Fixes #7429.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-31 02:21:05 +00:00
Michael Lotz
10a1a81d02 Also clear the sign extension when not changing signedness, as otherwise we'll
overwrite the values with the sign extension.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41850 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-31 02:09:10 +00:00
Michael Lotz
ef13dbda92 * Actually implement the relevant parts of BJoystick, i.e. reading the joystick
info and values. Inspired by and in parts based on the patch by caz_haiku in
  ticket #7429 (though rewritten completely due to the other changes). Thanks
  for the pointers!
* Clean up the mixup of internal joystick info and the one from
  joystick_driver.h so that BJoystick and the drivers talk about the same
  structures.
* Extensive coding style cleanup, simplifications, NULL checks, early returns,
  std::nothrow allocations, include sorting, argument naming, ... that kind of
  stuff.
* Added some TODO notes for remaining stuff.
* Automatic (and manual) whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-31 02:05:39 +00:00
Scott McCreary
331a968c65 Updated bepdf OptionalPackage for alpha3, moved licenses into to .OptionalPackageDescription file instead of OptionalPackages.
+alpha3


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-31 00:10:54 +00:00
Michael Lotz
6d551ee44f Also take the unsigned -> signed conversion into account.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 22:31:59 +00:00
Jérôme Duval
2925a66e80 revert r41842
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41845 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 22:17:56 +00:00
Clemens Zeidler
3b0616a46b Add more random into the SSL seed. Thanks Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41844 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 21:50:13 +00:00
Michael Lotz
d75a906285 Add a ScaledData() getter that scales the data to the desired bit width and
converts the signed-ness as specified.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41843 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 21:45:10 +00:00
Jérôme Duval
e761436dee Also enables the Initialize menu when the partition is also a device: Hopefully should fix #7572.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 21:42:35 +00:00
Clemens Zeidler
a4710c0d46 Move ServerConnection class from the IMAP add-on to libmail.so. This avoids to init SSL each time an IMAP add-on
is loaded. SMTP and POP still have this problem! TODO: use the ServerConnection class in these add-ons too.
This would also remove a lot of #ifdef SSL form these add-ons. Will not do it in the near future, feel free to fix it
...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41840 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 21:36:06 +00:00
Axel Dörfler
3feabba6d9 * Applied patch by idefix that fixes IDE. Nah, that fixes launching BootManager
when mimset didn't run yet. This obviously cleans up after a change that I
  did, thanks a lot!
* This closes bug #7595.
* Also took the opportunity to clean up a bit more in this regard, and fixed a
  few coding style violations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41837 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 21:17:10 +00:00
Michael Lotz
b5274bc4f6 Pass read and write calls to the protocol handlers as well, moving the default
of returning B_ERROR to the ProtocolHandler base class. Not used yet, but will
be used for the BJoystick <-> JoystickProtocolHandler.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 19:53:14 +00:00