Commit Graph

2818 Commits

Author SHA1 Message Date
Stephan Aßmus
8bf58c3b53 Specify the maximum signature buffer size to prevent unwanted overflow.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29338 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-27 21:11:05 +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 #1527, 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
Stephan Aßmus
2b4f382aac * When painting the view background bitmap, make sure to do
this with a reasonable drawing mode. Otherwise the current
  graphics state setup may not be what we need.
* Automatic white space cleanup. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29309 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-24 10:50:47 +00:00
Ingo Weinhold
cb5d702190 TeamDebugHandler::_HandlerThread(): Remove and delete the team handler in any
case, not only when we kill the team, i.e. also when the team just died or we
handed it over to another debugger. We can do this, since it is also safe to
assume that we won't get any further debug messages from the team after a
B_DEBUGGER_MESSAGE_TEAM_DELETED or B_DEBUGGER_MESSAGE_HANDED_OVER. We were
leaking (well, keeping) the team handler in those cases, which was a problem
in the latter one, since we silently ate all debug messages for the team in
case it would be re-attached later. Fixes bug #2942.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29300 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-23 22:51:01 +00:00
Michael Lotz
65cae88fb5 Fix the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29236 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-16 16:44:51 +00:00
Axel Dörfler
1a905a762a * The auto-config looper now correctly sets the IFF_CONFIGURING flag - it
cannot be set in the AF_LINK level.
* It now also checks for this flag, so that the fallback configuration won't
  overwrite a manually configured interface anymore.
* When an interface is configured, the IFF_CONFIGURING flag is now cleared as
  it should.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29230 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-16 11:03:13 +00:00
Stephan Aßmus
700ab492a9 Finished the optimization for vertical gradients. This code is about
8.3 times faster than using the AGG pipeline, but about 3 times slower
than drawing a solid color square. It can probably still be improved.
The second version of _MakeGradient() is more powerful than the old one
and should replace it. It handles some corner cases, which the other
one does not.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29220 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-15 18:14:35 +00:00
Stephan Aßmus
64eb49fd24 * Cleanup in the Gradient department. No fuctional change.
Renamed BGradient::color_step to BGradient::ColorStop
  as it's called everywhere else. Also renamed BGradient::gradient_type
  to just BGradient::Type. Renamed BGradient::Type() to GetType().
* Simplification of method names in Painter.cpp. Some not yet
  complete and yet inactive code to accelerate vertical gradients
  (bypassing AGG for this special case).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-15 15:15:49 +00:00
Stephan Aßmus
a21cfee7f4 Do not let layout the resize rect for borderless windows or
one pixel border windows. This would influence the window
size constraints for no reason and would for example affect
menu windows (one item menus or empty menus would be forced
to be too tall because of this bug).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29212 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-15 15:02:37 +00:00
Oliver Ruiz Dorantes
9306af4deb This allows that 2 or more LocalDevices can be retrieved with repeated calls of LocalDevice::GetLocalDevice()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29156 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-08 01:56:16 +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
Michael Lotz
779bacf0fe This was most probably a typo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29122 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-01 23:25:41 +00:00
Stephan Aßmus
740ea80754 Exclude any dirty regions from scrolling or copybitting. The previous behavior,
which was also the BeOS behavior IIRC, has annoyed me a bit as an application
developer. It wasn't possible to avoid display artifacts, if for example
scrolling a view which needed to be redrawn at the same time. It sounds
strange, but makes perfect sense for the situation I have here.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29101 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-31 20:11:34 +00:00
Oliver Ruiz Dorantes
734ab97cfa Clean a bit the devfs monitoring stuff. Now monitores the correct folder, and registers everything that is already present(hotplugging not tested)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-29 22:12:54 +00:00
Oliver Ruiz Dorantes
06b6c3cbfa Styling
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29089 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-29 22:09:28 +00:00
Karsten Heimrich
2f8465212f * use client_window_info as suggested by Axel
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29079 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-28 19:51:18 +00:00
Karsten Heimrich
320a952cdd * extend Haiku specific client window info to include the tab height and border size
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29064 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-27 21:03:32 +00:00
Stephan Aßmus
195d11fe5b D'oh! The GlyphCache memory is already managed by the block allocator.
There was no leak before and r29047 freed the memory twice. Sorry about
that. Already feeling like getting old and there is proof left and
right...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29061 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-27 18:47:18 +00:00
Stephan Aßmus
edd0e35777 The glpyhs stored in a font cache entry were never freed upon
deletion of the entry.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29047 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-26 19:25: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
Stephan Aßmus
a4a780dbed Removed left over.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28969 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-20 12:17:10 +00:00
Axel Dörfler
a107d1676e * Made the get_token_list() function behave the same way as under BeOS. This
simplifies the code in the Switcher, but has the drawback that the window
  list is not "static" anymore, ie. the items in the window list of the Deskbar
  will now jump around as in BeOS.
* However, EasyMove now works under Haiku as well out of the box, if that is
  something we want :)
* Maybe we should instead add another parameter to the window list to make
  it sorted or not; sorting the list as it's done now is much simpler and
  faster on the server.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28959 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-19 19:16:43 +00:00
Stephan Aßmus
7f6629a943 Tweaking the look again, trying to take some of Axel's suggestions
into account. I think the shadow bevel on the right is a spoiler
though, and will change that back. But Axel can compare this way...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28956 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-19 16:54:16 +00:00
Stephan Aßmus
ce5d64725d * Renamed the drawing functions in DrawingEngine to
remove the *Gradient part. In general, there is
  a lot of code duplication now, also in Painter. I
  will need to find a way to elliminate this again.
  Also, all the stroking functions should be gradient
  enabled as well.
* Improved the look of the DefaultDecorater, inspired
  by the patch from Dennis Washington. I did not adopt
  the changes which give backwards compatibility
  problems, though, like changing the window border
  width or the single border decorator color. But I
  reckon these changes are overall even a bit smoother.
* Fixed a long standing decorator bug, where the resize
  area of the border was visually different than the
  click recognition.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28951 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-19 10:31:43 +00:00
Axel Dörfler
2ea5e5e8e5 * We should not ignore the minimize request completely when the window is
hidden, but at least set it to minimized.
* Also, we shouldn't show minimized windows, but keep them hidden. This prevents
  the app_server/BWindow to go out of sync wrt the show level. This also fixes
  bug #3258.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28938 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-18 17:30:57 +00:00
Bruno G. Albuquerque
b100149cb4 - Small style change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28936 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-18 16:05:46 +00:00
Bruno G. Albuquerque
35336d367e - Updated copyright header.
- Fixed some styles violations.
- Changed signature to include the executable name.

Preparation for the new code coming.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28935 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-18 15:26:11 +00:00
Oliver Ruiz Dorantes
e5da0ec57e some cleanups and styling by Mika and me
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28915 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-16 20:32:19 +00:00
Axel Dörfler
3dc4e7fa47 * The move/resize window protocol now uses absolute coordinates rather than
relative ones. This fixes bugs #2658, and #3213; in BWindow::ScreenChanged()
  the window does not yet know that it moved on the new screen (when it already
  had a position on that workspace).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-15 11:35:39 +00:00
Axel Dörfler
f3bd277ed5 * Moved the screen change to a later point, as the workspace-leaving message
did arrive after the change; now it's: leave workspace, change screen,
  enter workspace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28907 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-15 11:33:13 +00:00
Axel Dörfler
ea5c7202cb * If a window was hidden during resize/movement, it would still be in resizing
or moving mode when it was shown again. Added a test app HideAndShow which let
  you easily reproduce the faulty behaviour (with a previous version of the
  app_server, that is).
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28847 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-05 10:32:30 +00:00
Axel Dörfler
790d3aee0a * When the window to be activated isn't a normal visible window (ie. floating
or modal), we need to check if our effort to make it visible (by activating
  its subset window) was successful. This fixes bug #3201.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28843 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-02 10:33:46 +00:00
Axel Dörfler
e4737a9260 * Added a third hinting mode: monospaced fonts only. This is especially helpful
with low resolution devices like the EeePC - small fonts can look pretty bad
  when hinting is turned on, and you still have the advantage of hinting for
  text editors and the terminal.
* Added a ServerFont::Hinting() method (that currently only evaluates the
  global hinting setting).
* Added a TODO comment on why having global settings is not what we aim for.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28837 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-31 18:44:02 +00:00
Axel Dörfler
fd95a7e124 * The net_server now accepts messages from the outside that want to configure
an interface (I don't remember why I didn't want this earlier, but well).
* ifconfig now has an auto-config option that will trigger DHCP.
* Also, it will now remove the IFF_AUTO_CONFIGURED and IFF_CONFIGURING flags
  if an address is specified (any on-going auto-configuration should check for
  these and abort if they aren't there anymore).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-28 22:18:21 +00:00
Axel Dörfler
293ed4fe5b * Pulled an AutoconfigClient class out of DHCPClient - all clients are supposed
to inherit from that one (there is still just a single client, though, this
  just simplifies having a generic mechanism to register and use auto-config
  clients).
* AutoconfigLooper now listens to link changes, and will reconfigure the
  interface if a new link is there - this even seems to work in emulation, will
  test on real hardware next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28827 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-27 22:15:17 +00:00
Rene Gollent
168cc3df42 Patch by Adrian Panasiuk: Initialize the renewal time before starting the message runner. This fixes a timing race that would trigger on some DHCP servers and result in constant renewal requests (Ticket #2531). Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-19 22:47:41 +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
Oliver Ruiz Dorantes
33fe7b32db - Implement retrieval of Device Classes.
- Implement DeviceClass for easy analisys of discovered devices's type.
- Make harder the intantiation of RemoteDevices.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-13 23:41:32 +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
Rene Gollent
0017304e3d Correct a small style violation noted by Axel, and add a TODO note.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28799 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-10 14:41:10 +00:00
Rene Gollent
27c43a2d8f Implement the missing pieces to handle per workspace display mode support.
Adjust Workspace view to correctly scale each workspace based on the 
resolution of that workspace. This exposes one or two anomalies in other
places in the app_server code though which I wasn't able to track down.
This fixes ticket #693.




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-09 02:50:23 +00:00
Oliver Ruiz Dorantes
fbbf64a410 Remove dedicated implementation of GetAddress and GetName in server side.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-08 22:49:20 +00:00
Rene Gollent
71279b24dd Adjust the thread counting to use atomic adds. This should prevent the previous scenario where many more threads than the limit could actually be spawned.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28775 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-04 03:28:19 +00:00
Rene Gollent
83868e649d Defer actually spawning the thread to the call to Run(). The way the thread manager is currently written as a whole won't correctly enforce the thread limit (looking into that, though I think a different approach entirely is merited here anyways), but this at least prevents large numbers of threads from being spawned and sitting in the suspended state in the registrar forever. Fixes ticket #3172.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28774 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-04 00:28:03 +00:00
Axel Dörfler
bcc8dada2c * dhcp_message::seconds_since_start was set to a negative value, causing
corrupt values. Maybe this changes something with bug #2531.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28749 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-28 21:34:48 +00:00
Axel Dörfler
0a31071e2f stippi+axeld:
* DrawString() took the fast clipping path for rotated fonts which didn't work
  out (visible when moving a window over the rotated texts in DriveSetup).
* Also, made it work correctly when using sheared fonts.
* Fixed typo.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28741 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-28 19:59:34 +00:00
Oliver Ruiz Dorantes
0029cf816e -Add the possibility to post formatted messages to the debug window
-Make the window resizable. BUT as this is a multitab window when I resize, only the view in the active TAB is resized, as soon as I switch to another TAB the view in the new selected tab has its old size, messing all.

* Can any UI guru explain whats the Best/Elegant way fixing this?



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28735 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-26 18:05:27 +00:00
Oliver Ruiz Dorantes
d23283c43e Increase the priority of the thread handling the HCI events, + a bit formatting
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28728 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-25 22:38:55 +00:00
Rene Gollent
6cf3a9ebf7 The previous commit exposed another bug: BWindow::Zoom() incorrectly calculated the max height of the window by only including the border width once. This was previously masked by the fact that the (by default 5) extra pixels were included in its hardcoded default for the height of the tab. Also add the border width to the message returned by GetDecoratorSettings() so Zoom can use the actual value instead of hardcoding it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-17 04:15:51 +00:00
Stephan Aßmus
231cbd908e Actually restore the "dragger" settings. So the system remember your "Show
Replicants" setting after reboot.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28670 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-16 22:23:15 +00:00
Axel Dörfler
0a3f410f30 * Added a Desktop::BroadcastToAllWindows() method that sends all ServerWindows
a message.
* The DesktopSettings class is now using that to send the new
  AS_SYSTEM_FONT_CHANGED message to all windows.
* The ServerWindow now propagates font changes to its decorator, causing it
  to update its drawing. That means changing the bold font in the "Fonts"
  preferences application will instantly change all window titles.
* Factored out a _RebuildAndRedrawAfterWindowChange() out of several Desktop
  methods, simplifying some code.
* The DefaultDecorator no longer calls _DoLayout() twice (through SetLook()),
  but instead calls the new _UpdateFont() method now also called by
  FontsChanged(), and SetLook().
* BWindow::GetDecoratorSettings() now also includes "tab frame" BRect with the
  exact footprint of the tab, allowing apps to know the size of the tab to
  position itself accordingly.
* Automatic white space cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-16 21:59:05 +00:00
Axel Dörfler
0c9593acdc * Minor simplification and clarification.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28650 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-14 13:44:25 +00:00
Axel Dörfler
d02835660f * Added a method Desktop::_LastFocusSubsetWindow() which returns the last
window being the focus window that is a subset of the specified window.
* This is now used to bring the window to front belonging to a floating
  or modal window (if on another workspace), ie. Desktop::ActivateWindow()
  should now work with modal and floating windows.
* Fixed typo (in Window.cpp).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-14 13:37:27 +00:00
Rene Gollent
f871c6f737 Reset the drawing state to that of the client view after we finish drawing the workspaces replicant. This fixes artifacts like fonts occasionally appearing tiny when selecting/deselecting items on the Desktop if the Workspaces replicant was also embedded.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-09 22:04:51 +00:00
Stephan Aßmus
52de6dce94 Moved the gradient_type and color_step structs into the BGradient
class/namespace. Renamed the B_GRADIENT_* types to TYPE_* as the context
is already given.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28564 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-08 14:56:56 +00:00
Axel Dörfler
c73be1e843 * When switching to a workspace a window is on in ActivateWindow(), only
consider the workspaces in the configured count.
* If the window is not on the current workspace after the workspace check,
  always move it to the current instead. This lets windows on workspaces
  outside of the ones currently configured show up on the current workspace
  as if they had the B_NOT_ANCHORED_ON_ACTIVATE flag set.
* This fixes bug #3003.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-07 11:36:22 +00:00
Stephan Aßmus
f7c8477593 * Don't invalidate anything in offscreen windows. NetPositive is doing
slightly strange redrawing, including scrolling the offscreen view
  that it uses in "flicker free" mode (which is the default). Invalidation
  does not work in offscreen windows, since the client thread is not running
  and certainly won't redraw anything. But that will leave a non-drawable
  region on the app_server side of things. Simply don't invalidate in
  this case. From what I have seen, redrawing in NetPositive seems to
  work fine now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-06 19:19:54 +00:00
Stephan Aßmus
e98ee1410a * big cleanup of the tracing support, output useful information
for most messages, use debug_printf(), cleanup line breaks
* check return code of last link method in a lot more places
* changed some printf() and fprintf() into debug_printf()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28537 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-06 19:16:56 +00:00
Axel Dörfler
33309cb5fc * BWindowScreen::_InitClone() was broken, it called the "get clone info" method
on uninitialized accelerant, but that's what AS_GET_DRIVER_PATH is for.
* This should fix #2847.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-06 12:44:26 +00:00
Jérôme Duval
bda802b259 now uses DIRECT_BUFFER_INFO_AREA_SIZE as the direct_buffer_info area size
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-05 23:44:14 +00:00
Stephan Aßmus
ca89b8ff59 * The app_server implementation of BView::GetClippingRegion() was using the
wrong check to see if the view was currently visible. This fixes the problem
  that tool tips would popup for windows that are located on other workspaces.
* Removed commented out code that is no longer needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28498 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-04 15:27:56 +00:00
Stephan Aßmus
40fa49e7b8 Oversight: When FFM is turned off, don't focus the window under the mouse
on mouse up if there was a focus-locked window.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-03 19:57:05 +00:00
Stephan Aßmus
21b40edd75 Implemented respecting B_LOCK_WINDOW_FOCUS that a view can set using
SetMouseEventMask() from within it's mouse hooks. Among other things,
scroll bars won't stop scrolling in FFM mode now if you accidentally
leave the window with the mouse, something which is very likely.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-03 19:34:13 +00:00
Stephan Aßmus
6198dc0e17 To allow testing the ViewHWInterface (used in the test environment) with
both double buffering and single buffering, Invalidate() needs to be
virtual and ViewHWInterface needs to decide where to invalidate it's host
window.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28480 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-03 19:31:26 +00:00
François Revol
48ccb49ab0 Added TODO on SetTitle... the rect gets invalidated even when nothing is visible... flickers apps on top with TitleSpectrumAnalyzer in SoundPlay for ex...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28388 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-30 23:04:40 +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
Michael Lotz
a0d69d7dac Also add the border overlap on both sides to the available space of the initial
tab width. This fixes the initially wrong tab width for windows where the title
does not fit and previously there would be 10 pixels waste on the right.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28331 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-26 10:53:13 +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
Axel Dörfler
85dbe55d9b * r28281 accidently added the B_NORMAL_WINDOW_FEEL (0) to the list of special
feels. This caused floating/modal app and subset windows to not work anymore.
* This fixes bug #2914.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28309 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 10:02:12 +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
Jérôme Duval
bdb1d3ac7c * BMediaRoster::GetAudio*() should return B_NAME_NOT_FOUND when nothing is set
* In this case, SoundRecorder shows a different error message, more informative, confer bug #134


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28303 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-23 21:30:19 +00:00
Stephan Aßmus
2469a6f427 * Rewrote the UpdateQueue class. It actually works now and would perform screen
updates during the vertical refresh, but it causes flickering again since
  there is no guarantee that screen regions will stay clean from the time that
  they were scheduled with the UpdateQueue until the UpdateQueue thread
  transfers them. Therefor it is still disabled.
* Refactored a bit the distinction between Invalidate() and CopyToFront().
  Invalidate() used to be virtual, but now CopyToFront() is. This was mainly
  needed for the app_server test environment, because the host window needs
  to call Invalidate() when the front buffer bitmap is clean. When the
  UpdateQueue is used, this needs to be CopyToFront(). Now the separation is
  cleaner in combination with the UpdateQueue.
* Fixed a problem in HWInterface::CopyToFront(): When separating the region
  outside the cursor and the region with the cursor during a transfer, it
  needs to hold the fFloatingOverlay lock to make sure the cursor is not
  moved in the meantime. This fixes graphics glitches with remnants of the
  cursor staying on screen. These could very rarely be observed, but much more
  often with the accelerated double-buffer mode.
* Enabled the accelerated double buffered mode, since it works now very well.
  I was able to test it with the nVidea driver on an nVideo 7300. It works by
  allocating a frame buffer twice the height of the configured screen mode.
  Then all drawing goes into the offscreen portion, including accelerated
  driver functions. AccelerantHWInterface::_CopyToFront() then uses acceleration
  to blit the clean regions in the offscreen portion of the frame buffer into
  the visible part. Please tell me if there are problems, for example when
  if there is too few video memory, or if a driver does not handle it correctly.
  To disable it, see src/servers/app/drawing/AccelerantHWInterface.cpp line 511.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28301 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-23 17:15:39 +00:00
Stephan Aßmus
8b8e062daa * DrawingEngine::CopyBits() was invalidating the wrong region (without offset)
when the HWInterface was using acceleration and at the same time double
  buffering.
* _CopyToFront() should always be used, since it calls a protected virtual that
  derived classes of HWInterface depend on. This fixes some graphics glitches
  in certain situations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28300 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-23 17:02:46 +00:00
Axel Dörfler
4932bc5ea8 * Added the BeOS feature that Command-~ (with American keymap) will switch
workspaces between this and the previous one.
* Note that this is mapped to a specific key on the keyboard (key 17), so
  it will differ with the keymap, but will usually be the key below the escape
  key.
* This closes ticket #2766.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28282 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-22 12:02:49 +00:00
Axel Dörfler
89b1afd16c * Added a new window feel kPasswordWindowFeel that is above all other feels.
* Changed the password window to use this feel.
* Later, the screen saver itself should use this feel whenever the password
  mode is enabled. The password window should then use a modal-app feel, but
  this doesn't work yet.


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


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
Axel Dörfler
0f32f7ddeb * Added an ASSERT() and a check to make sure the workspace that Backmost() and
Frontmost() are using is valid.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28228 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-18 11:59:02 +00:00
Axel Dörfler
955307393f * Reworked EventDispatcher::SendFakeMouseMoved() after an idea by Stephan
that solves most app_server locking headaches: it now works asynchronously,
  and therefore doesn't need to lock the EventDispatcher anymore.
* EventStreams now allow to inject messages into the stream to allow the above
  functionality.
* InputServerStream::GetNextEvent() no longer returns when there is no event.
* Desktop::ActivateWindow() now locks all windows before checking the
  workspaces of the windows, fixing a race condition that could lead to
  Window::Foremost() being called for a window that isn't on the current
  workspace, leading to a crash.
* I currently cannot access Trac, but I recall there should be an open bug
  report about this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 21:37:10 +00:00
Axel Dörfler
c2a8fd9b70 * AS_ACTIVATE_WINDOW must not hold a window lock when calling
Desktop::ActivateWindow(), or Desktop::SendWindowBehind().
* This fixes a potential deadlock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28217 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 15:48:29 +00:00
Rene Gollent
4a4355bd7d app_server was not storing its settings when the workspace count was changed.
As a consequence this setting was lost unless another setting was also altered
that affected the workspace configuration in some way.
Fixes #2849.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28206 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 01:56:44 +00:00
Axel Dörfler
64ba396fa7 * When changing the workspace of a window, it's workspace position will now be
set to its current position if that is the only workspace it's in.
* This fixes missing windows on other workspaces in the Workspaces app after
  boot, ie. before you had visited that workspace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 01:31:44 +00:00
Axel Dörfler
4e59d9c7b4 * Use a good default "yellow" in case there is no decorator (otherwise yellow
isn't initialized, but also not really used currently).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 01:30:06 +00:00
Stephan Aßmus
bf3a206445 Fixed r28168, which introduced an app_server deadlock. Functions
which call into Desktop methods which in turn grab the window
write lock are never supposed to hold this write lock themselves
already, since the Desktop code takes care to not hold the lock
when for example calling EventDispatcher methods, which would
cause a deadlock (as in this example).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28175 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 18:01:55 +00:00
Axel Dörfler
96c6ee9507 * _Show() and _Hide() must now be called with having all windows locked
(it would do that internally anyway).
* AS_MINIMIZE no longer calls _Show() when being unminimized, but
  Desktop::ActivateWindow(), as this will also bring the window on the screen
  if it's on another workspace (according to its flags).
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28168 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 12:15:02 +00:00
Stephan Aßmus
431dc47dde Patch by Artur Wyszynski with some changes by myself:
* Resolved TODO: The type of the gradient is no longer encoded twice in the
  app_server link protocoll.
* Moved instantiation of the BGradient into the LinkReceiver::ReadGradient()
  method.
* Check success for (at least) ReadGradient() in ServerWindow.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28150 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-15 19:47:00 +00:00
Stephan Aßmus
991547ef6c Patch by Artur Wyszynski:
* Implemented BGradient, BGradientLinear, BGradientRadial,
  BGradientDiamond, BGradientConic and BGradientRadialFocus
  new Interface Kit classes.
* Implemented all the (AGG-based) backend necessary in
  the app_server to render gradients (Painter, DrawingEngine)
* app_server/View can convert a BGradient layout to screen
  coordinates.
* Added BGradient methods of the Fill* methods in BView.
* Implemented a test app and added it to the image as a
  demo.
* Adopted Icon-O-Matic and libs/icon in order to avoid
  clashing with the new BGradient class. Re-use some
  parts where possible.

Awesome work, Artur! Thanks a lot. Now a more modern
looking GUI has just become much easier to implement! :-)

TODO:
* Remove the need to have gradient type twice in the
  app_server protocol.
* Refactor some parts of the patch to remove duplicated
  code (Painter, DrawingEngine).
* Adopt the BPicture protocol to know about BGradients.
* Review some parts of the BArchivable implementation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28109 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-14 21:27:42 +00:00
Stephan Aßmus
73be167630 * Removed dead code.
* Fixed line lengths.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-14 19:48:35 +00:00
Stephan Aßmus
f6bffd4e5b Whitespace cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28101 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-14 19:47:00 +00:00
Stephan Aßmus
eeb00d5abc Small indentation improvement...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28084 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-14 13:21:43 +00:00
Stephan Aßmus
e385b2434f * Added clarifying comment.
* When the consumer does not want to consume a glyph, make
  sure the advance values are being reset before breaking out of the
  loop. These are used one more time after the loop.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28083 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-14 13:20:29 +00:00
Stephan Aßmus
47ddcdba73 Removed superfluous parenthesis.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28082 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-14 13:19:15 +00:00
Stephan Aßmus
350b87c7d2 zooey + axeld + stippi:
Fixed a problem with dispatching B_MOUSE_MOVED messages to views which need
the transit event:
* If the app_server decided to send a B_MOUSE_MOVED to the previous mouse
  containing window, it forgot to add the _feed_focus flag, which was a problem
  if the message actually happened to contain tokens (views that registered
  for events.) On the client side, only those views would receive the message,
  while the regular last mouse moved view would not be notified at all.
* On the client side, never change fLastMouseMovedView if the message is not
  targeted at the preferred handler. In the above situation, any "registered
  for events views" would receive the message first, but viewUnderMouse would
  be NULL and then when the regular last mouse moved view received it, it
  resulted in the wrong transit (B_OUTSIDE_VIEW instead of B_EXITED_VIEW).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28059 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-13 23:16:30 +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
Axel Dörfler
36bde12db2 * DHCP now actually uses the new SO_BINDTODEVICE socket option to make sure
the request is sent only on the device it should.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28017 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-12 23:34:08 +00:00
Jérôme Duval
efc97b9894 made several inherited methods virtual
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27993 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-12 13:07:01 +00:00
Axel Dörfler
3add2e79b7 * If you click on a window in the Workspaces view, it won't move until you
move the mouse a bit more. This should help with "fast" workspace switches
  when you click on a workspace and accidently move the mouse a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27977 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-11 20:06:04 +00:00
Stephan Aßmus
f7d800884d Polished the rendering of the miniature windows in Workspaces.
* The window names are now drawn.
* The window scaling is improved to avoid wobbly placement
  when windows move slightly.
* The tab rect is scaled to size, not a single line.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27976 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-11 18:25:36 +00:00
Stephan Aßmus
877f6beaec zuMi was at it again and created a cool icon for the mail_daemon. Almost a pity
to use this gem for a background application. :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-10 19:14:20 +00:00
Axel Dörfler
54f92239a2 * The ServerWindow now memorizes the original BDirectWindow feel when switching
to full screen. Since BDirectWindows can have any feel, this does now
  correctly restore it instead of always reverting to B_NORMAL_WINDOW_FEEL.
* This fixes part of bug #2808.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27920 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-08 07:46:27 +00:00
Stephan Aßmus
dc2da019f9 zuMi created a pretty awesome icon for the debug server. It could be improved
(for better silhouettes), but I think it's pretty cool as is! Thanks a lot!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27915 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-07 21:48:37 +00:00
Stefano Ceccherini
36bc11a79f I'm getting old. Without this change, bug #2350 was still with us. Sorry for forgetting to commit this
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-07 13:06:16 +00:00
Stefano Ceccherini
bebd82c2b2 should've been part of r27898
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27899 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-07 05:51:09 +00:00
Stefano Ceccherini
0dcbaee24a Screen was assuming setting a 800x600 mode would work anyway, but currently the Intel driver only supports the 'native' mode for laptop panels. Added a 'strict' parameter to SetBestMode which, if true, fails if it doesn't find any mode with the passed width. If false, and can't find any good mode, just uses the first mode in the list (could be improved). This fixes bug #2350
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27898 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-07 05:47:57 +00:00
Stephan Aßmus
aed05d6cf6 * Added Syslog daemon icon by zuMi. Slight tweaks by myself.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27867 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-04 17:29:17 +00:00
Axel Dörfler
1b910a79a2 * Since the "restart"/"shutdown" alert has the inconvenient consequence that the
shutdown process is entered (ie. you cannot start new applications anymore),
  I changed its window feel to normal to make it possible to let it appear on
  all workspaces.
* We should think about if simply letting it enter that phase later isn't the
  better solution, though. Opinions welcome.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-01 16:45:59 +00:00
Stephan Aßmus
ea2317a80c * Tweaked registrar icon to make 16x16 version slightly clearer.
* Added icon to the registrar.
* Updated copyright years in version info.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-01 14:23:22 +00:00
Stephan Aßmus
165e3a7944 * Tweaked MediaServer icon a bit to improve gradients and make the 16x16
icon a little clearer.
* Applied icon to MediaServer rdef. Removed original BeOS icons. Updated
  copyright years.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27815 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-01 11:29:02 +00:00
Karsten Heimrich
611c6ed977 * forgot this file...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27803 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-30 21:56:31 +00:00
Karsten Heimrich
3580c2cf12 * remove png dump from app_server
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-30 21:49:20 +00:00
Stefano Ceccherini
e32494d24f Check for NULL before dereferencing the pointer. CID 1050
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27741 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-25 13:56:50 +00:00
Axel Dörfler
95deefbf66 * Fixed wrong indentation and spacing.
* Enlarged default port size to 50.
* Added license header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27622 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 13:12:22 +00:00
Stefano Ceccherini
632f1504a8 assign a token to the ServerPicture before anything else. If something fails to initialize, we can still search the picture via token
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-17 07:35:00 +00:00
Michael Lotz
173563d537 Update fallback mappings after removal of BitStream fonts. Not sure these are needed at all though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-16 21:10:30 +00:00
Stefano Ceccherini
a57b0996eb cleanup and return in error case, otherwise a stale style pointer could be added to the family. CID 1246
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 12:26:43 +00:00
Michael Lotz
bbe2597fb6 CID 18 and CID 19: Fix leaking the cursor data.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 16:39:11 +00:00
Michael Lotz
246a908734 * CID 1012: Fix leaking the OffsetFile in case it fails to initialize.
* Use std::nothrow (the rest of the file already used it).
* We also have to keep the source file around and properly dispose it, as
  OffsetFile doesn't take ownership of it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27486 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 16:30:48 +00:00
Michael Lotz
3e8d3c5f98 * CID 1090: Check the view pointer for NULL before dereferencing it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27484 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 15:55:15 +00:00
Michael Lotz
fccbe8f1a1 * CID 525: Check the return of _UpdateModeList() as otherwise fModeList can
still be NULL although it is used further down.
* CID 526: Check the front buffer to be available before using it in SetMode().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 15:51:16 +00:00
Michael Lotz
7c618f130f Remove accidentally introduced whitespace in last commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27482 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 15:30:19 +00:00
Michael Lotz
8050519bed CID 157: Fix usage of *covers instead of cover which in this case indeed is NULL
and should have lead to a crash.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 15:28:31 +00:00
Michael Lotz
4071a5a97b CID 930: Fix memory leak in error case.
Note that this file has a completely different coding style, violating ours for
consistency until the whole file can be cleaned up.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27480 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 15:22:30 +00:00
Ryan Leavengood
9b54ac7464 Fixing CID 1305: the null check of fPageFormatText on line 483 was redundant
since fPageFormatText is accessed in both branches of the if before the null
check. If it was actually null there would be a crash well before line 483. In
addition this member is initialized in the constructor. I assume the null check
was added to provide symmetry with the null check of fJobSetupText below it.
But that latter null check is needed since fJobSetupText may not have been
created in the constructor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 04:13:30 +00:00
Stefano Ceccherini
de2dcd9ab0 fixed another round of gcc4 warnings
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-10 09:13:02 +00:00
Stefano Ceccherini
bb549f1c81 Implemented dummy FontStyle::IsFullAndHalfFixed(). Freetype doesn't seem to offer any api to be able to tell such a font from others
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27398 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-10 09:02:59 +00:00
Ingo Weinhold
d29be7f320 * CID 153 (line 754): delete array with delete[].
* CID 152 (line 796): delete array with delete[].
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27393 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-09 21:32:15 +00:00
Stefano Ceccherini
8b330bfe28 Should have been part of the previous commit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27388 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-09 09:54:07 +00:00
Stefano Ceccherini
5f8c1a0244 Remove unused RamLinkMsgReader. Its functionality was integrated inside LinkMsgReader/Sender by Julun.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27387 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-09 09:53:27 +00:00
Karsten Heimrich
2982ae5d1a * comment the code that prevents programmatically resize events during
a user resize, this makes ArtPAint's tool pallete window resize properly

  Thanks Stephan for explaining me two time what to look for  :)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27384 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-08 20:23:00 +00:00
Michael Lotz
57665c6ef2 Respect B_NOT_MINIMIZABLE in the default decorator. Maybe we should recheck all the flags in the window code though instead of relying fully on the decorator.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-08 08:33:49 +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
Stefano Ceccherini
52b877461d Apply the same logic of r24682 to the drawing of BPictures inside BPictures. Fixes part of bug #1389 (drawing pictures at an offset). Thanks to Karsten for his observations!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27267 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-01 14:43:25 +00:00
Karsten Heimrich
3bc4dacf9a * We need to update the drawing state in case SetHighColor, SetDrawingMode etc.
is called after BeginPicture on a freshly created view.

  This is necessary because a second invocation on this view with BeginPicture
  would have caused ServerPicture::SyncState to write the default drawing state
  into the picture. This happens because to BView had now cached the values and
  therefor won't go to the app_server and tell about the change. The first call
  did not change anything as picture recording is handled in _DispatchPictureMessage
  while view changes that modify drawing state are handled in _DispatchViewMessage,
  thus leading to default draw state values beeing written.

  This fixes invalid ticket #2534.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27218 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 12:01:46 +00:00
Karsten Heimrich
4e61552ecd * first implementation of passing data via area to app_server
this makes printing of large images work, fixes task #1067



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-27 13:39:16 +00:00
Stefano Ceccherini
139f143c62 fixed warnings. Maybe we should do all the calculations in ints instead of using floats
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27207 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-26 06:59:00 +00:00
Bruno G. Albuquerque
ec44f528d8 - Added handling for the table of contents (toc) attribute. Now it is ready to
retrieve CDDB information. This is coming as soon as I have real time (as
  opposed to some minutes during lunch) to work on it.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27200 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 17:43:10 +00:00
Stefano Ceccherini
c63991d1f5 fixed warnings
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27198 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 15:07:14 +00:00
Stefano Ceccherini
d02fd30b90 We were leaking memory every time a BPicture was drawn. Also check if the allocations succeeded. Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 13:57:29 +00:00
Jérôme Duval
65e6fe82ad better check the size of the chars table for keymaps. this avoids crashing in #2659.
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
Stephan Aßmus
fe34b1990b * Fixed bug with cropped scaled bitmaps, the wrong offset was used. This fixes
a regression in MediaPlayers peak display where the last row of pixels was
  wrong.
* Fixed clipping rect bugs in the new bilinear scaling loops, the last row
  and/or columns don't always need special treatment, only if they map to the
  last row and/or column of the destination bitmap.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27177 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 14:30:57 +00:00
Stephan Aßmus
c1111e046b * When playing with the MediaPlayer and toggling bilinear versus
nearest neighbor scaling, I noticed that the bilinear version
  actually used less CPU than the generic AGG code path with nn
  scaling. So I wrote an optimized nn scaling routine for nn
  based on the bilinear scaling code. So the indices into the
  source bitmap are cached. I don't know if this is the optimal
  nn scaling routine, but the CPU usage dropped significantly.
  Only B_OP_COPY is optimized as of yet.
* Optimized the bilinear scaling. When more filtered pixels than
  unfiltered pixels are anticipated, the loops are unrolled to
  special case the very last row/column and bottom right pixel.
  This eliminates the branches in the loops.
* Fixed a bug with partial scaled drawing of bitmaps when it
  used the bilinear scaling, the bitmapShift was in the wrong
  direction.


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


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27162 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 22:30:11 +00:00
Michael Pfeiffer
4523512663 Print jobs whose transport add-on is either "Print To File" or not set at all (in case of "Preview" printer) are not processed sequentially.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-21 20:16:24 +00:00
Bruno G. Albuquerque
233871e4d4 - Yet another style fix. This is getting old. :) Thanks Axel (again).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-21 14:28:20 +00:00