Commit Graph

1548 Commits

Author SHA1 Message Date
Ryan Leavengood
a26cf893d0 This removes some of the accidental submissions from my last commit.
For those wondering "mark_as" is the directory for the MarkAsRead and MarkAsNew
Tracker add-ons I'm planning to add (for email.) If anyone is violently 
opposed to this idea, speak now.

The WorkspacesLayer change was mostly an update to existing and ifdef 0'd
code so it would compile under ifdef 1. I left those changes and just set the
ifdef back to 0 here.

The other changes below were debugging and build changes that definitely were
not needed in the repository.

The undocumented changes in the last submission include some new keyboard
shortcuts in ShowImage as well as various changes to the input server and
roster as part of my ongoing work on those. I will clean this up some more 
and make another submission in a few hours.

Note to self: never submit from a high-level directory...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19480 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-13 00:43:13 +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
Stefano Ceccherini
8071d85b5a fixed the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-05 13:34:14 +00:00
Stephan Aßmus
2cfe93e780 * renamed HWInterface locking to LockParallelAccess() and
LockExclusiveAccess() (meaning more or less access to the
  frame buffer)
* extracted the AGGTextRenderer to be a global instance used
  by each Painter instance (currently, it is thread safe because
  of the global font lock, so there is some work left in this
  regard)
* gave every ServerWindow it's own DrawingEngine instance, this
  is work in progress. So far, there doesn't seem to be a regression,
  but less fighting over the exclusive access to the frame buffer, now
  each ServerWindow thread can draw in parallel. There is room for
  improvement, plus I think I'm leaking the DrawingEngine...
* changed the locking for the software cursor. ShowSoftwareCursor()
  can only be called if HideSoftwareCursor(BRect) returned true, or
  if you called the generic HideSoftwareCursor(), since it needs
  to keep the cursor lock and unlocks in Show...!
* some clean up and renaming in Decorator and friends
* moved PatternHandler.h to live along with the .cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-04 22:25:17 +00:00
Axel Dörfler
5131b5bcf6 The window and application server threads now run at B_DISPLAY_PRIORITY, too; this
was a stupid oversight, and should improve the responsiveness of the UI under load
a lot. Thanks Stefano!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19398 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-30 13:15:15 +00:00
Stephan Aßmus
54c22262f6 * cleanup (it is still used btw, at least in ServerFont)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19395 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-29 20:29:03 +00:00
Stephan Aßmus
67491d2adc * introduced a listener mechanism to be notified of frame buffer
changes in the HWInterface (ie on mode switch)
* initialization and shutdown of the HWInterface instance no longer
  go through DrawingEngine, which had nothing to do with it in the
  first place
(this is in preparation of giving each ServerWindow it's own
DrawingEngine instance)
* small performance improvement in ViewLayer::ScrollBy()
* some cleanup in ServerConfig.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19391 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-29 09:27:23 +00:00
Stephan Aßmus
264fe59ded * introduced IntPoint and IntRect, which are just like BPoint and BRect,
but use integer coordinates. These are now used in ViewLayer for the
  coordinate system (layout, scrolling offset, view bitmap layout)
* modest performance improvements by inlining some very often used
  methods, and by preventing to go down the entire layer tree too often,
  for example InvalidateScreenClipping was always called in the deep
  mode, therefor it is save to assume that the tree does not have to
  be traversed as soon as the clipping is already invalid


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19390 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-29 03:20:07 +00:00
Stephan Aßmus
ba688f3640 * small fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-29 03:16:51 +00:00
Stephan Aßmus
4d83ef04a2 * something was giving me trouble, don't know if this fixed it
or something else, but I don't think the change is bad (changed
  ServerProtocol.h from a local header to a system header)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19388 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-29 03:16:10 +00:00
Stephan Aßmus
5288f0a48d * use exit() instead of exit_thread(), makes profiling even possible
with the built-in GCC profiling (thanks Axel)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19387 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-29 03:14:15 +00:00
Stephan Aßmus
64792e619e * small fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19386 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-29 03:13:15 +00:00
Stefano Ceccherini
0c48fc7c74 Enable state synching for ServerPictures. Fixes bug 520
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19379 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-28 14:52:51 +00:00
Stefano Ceccherini
420fe80e5c Moved picture data writing to its own class, thus simplifying code in
various places. Implemented SetLineMode op for BPicture, fixed shape 
drawing (I accidentally broke it in the previous commit).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19264 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-12 20:00:36 +00:00
Stefano Ceccherini
ab757c7a3a our BPicture stream format wasn't compatible with R5 one.
Hopefully fixed all the problems. Reported by 
Marc Flerackers. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-09 21:53:45 +00:00
Stefano Ceccherini
8f38753043 ReadString() actually allocates memory... fixed that and another memory
leak


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-31 11:24:58 +00:00
Axel Dörfler
8e963d88f0 The app_server did not reset keyboard focus on B_INPUT_METHOD_EVENT messages.
This should fix bug #658.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19160 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-31 01:24:05 +00:00
Stefano Ceccherini
2f9eca855a moved Shape related defines to their own header
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-30 21:20:38 +00:00
Stefano Ceccherini
34633cab94 patch by Lucasz Zemczak which adds BShape drawing support to BPicture. Actually we should use a ShapeIterator subclass (like Lucasz did here) in Painter too instead of having duplicating code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19153 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-30 20:42:54 +00:00
Axel Dörfler
07dc2c6972 * The app_server now gives top-most menus the keyboard focus.
* BMenuWindow now makes its menu focus view, so that it can receive key events.
* Keyboard navigation doesn't work as it should though, that is bug #670 is
  still valid - there should even be another recently opened bug about this,
  but Trac obviously ate it :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19152 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-30 14:21:28 +00:00
Axel Dörfler
7430a5bea6 Removed the superfluous (doubled) AS_MOVEPENTO as well. Also removed those old constants
from the ServerProtocol.h header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19132 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-26 22:48:31 +00:00
Stefano Ceccherini
0e683ed9aa ServerPicture was using the wrong StrokeRect call (the one which ignored
the pen size). Added scale handling. Removed duplicated AS_SETPENSIZE 
handler in ServerWindow


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19130 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-26 19:49:02 +00:00
Stefano Ceccherini
467dbaa9e2 Fill/StrokeArc support for BPicture, courtesy of Lucasz Zemczak
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19103 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-23 11:54:44 +00:00
Stefano Ceccherini
0c40a6370e added part of a patch by Lukasz Zemczak which adds ellipse
filling/stroking support to BPictures. 
Thank you!"


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-23 09:50:22 +00:00
Stefano Ceccherini
3ffcd64e5c updated headers
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19099 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-23 09:29:30 +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
122a163324 The mouse event window will already be reset in RemoveWindow() (through HideWindow());
doing it here is not only superfluous, it would also cause to lose the window when switching
to a workspace where the window is not visible and back while dragging it around.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19076 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-17 20:52:03 +00:00
Axel Dörfler
8c68eab694 Fixed two different bugs that could cause bug #896:
* the app's Activate() method was called unsafely; the ServerApp pointer could
  have become invalid in the mean time.
* when hiding a floating window (because its parent got hidden) that had focus
  or even was the mouse event window (was currently dragged over the screen)
  the focus was not moved to another window.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19075 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-17 20:44:13 +00:00
Axel Dörfler
7dfa04527c Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19074 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-17 20:40:26 +00:00
Axel Dörfler
6edab6011e We must not have the font manager locked when locking the desktop (no matter
if read or write); there are some methods that cause a locking of the font
manager (like ServerFont::SetFamilyAndStyle()).
This fixes bug #885.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19051 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-12 12:34:19 +00:00
Stefano Ceccherini
c585b1f46d GetEscapements() didnt' take the font spacing into account. Looks like the spacing is ignored by the font backend, though, am I correct?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18990 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-03 11:46:55 +00:00
Stephan Aßmus
fd49bce12e * For DrawBitmap(), the bitmap rect needs to be aligned onto pixels
just like the view rect. This fixes bug 721.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-17 11:55:23 +00:00
Stephan Aßmus
d39634ce4d * on R5, the meaning of B_CONSTANT_ALPHA is a bit different
with regards to drawing bitmaps with alpha channel, instead
  of ignoring the bitmap alpha channel, it is further multiplied
  with the high color alpha channel, so basically, you can
  use the high color alpha as a "global" alpha value to
  draw the bitmap with
* removed some duplicate code


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18843 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-14 18:07:02 +00:00
Stephan Aßmus
846cc588f2 * a fix for the bug where clicking a window decor button drew
over the mouse cursor. The problem is actually something else:
  non-straight lines extend a little past the calculated rectangle 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-14 18:03:39 +00:00
Stephan Aßmus
ae540011ed * when the layout branch was merged, the same problem
got fixed twice, any unoptimized lines were drawn at
  a (0.5, 0.5) offset


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18841 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-14 18:00:09 +00:00
Stephan Aßmus
a907e70198 * a hack to support transparent CMAP8 color in bitmaps
(this would fix the white background on disabled looking
   icons if Tracker would still use B_CMAP8 icons)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18840 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-14 17:57:37 +00:00
Stephan Aßmus
af957c251b * don't read the frame buffer a second time when no
blending has to take place


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18839 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-14 17:55:55 +00:00
Stephan Aßmus
4423855cbd This is the kind of bug you can search for hours. At first, I suspected
a concurency problem in the DrawingEngine, so there is some debugging
stuff added, as well as some unnecessary locking removed there. The
problem was in Painter though, in that certain functions adjusted clipping
at the "rasterizer level", while some other functions didn't care about
that. Now the clipping is consistently set at the rasterizer level (rough
estimate to avoid scanline generation outside real clipping region bounds).
There are a number of bugs fixed by this, I'm going to find out later,
what their ticket numbers are... Mouse preflet draws the mouse now,
Backgrounds preflet draws the screen reliably... probably more, anything
to do with bitmaps, round rects and possibly ellipses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-13 20:02:00 +00:00
Ingo Weinhold
9ecf9d1c1d Merge from layout management branch.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-26 16:21:15 +00:00
Axel Dörfler
a17c3a48b8 Changed the way DesktopSettings work:
* Removed the DesktopSettings lock itself - it's not really needed at all,
  and causes some trouble with a clean locking design. This may even have
  fixed bug #757, at least I couldn't reproduce it anymore.
* There is now a class for read-only access that requires you to have locked
  the desktop (either read or write).
* There is now another class LockedDesktopSettings that allows you to set
  settings (and only that) - when you're changing the settings, you must not
  have read locked the desktop (ie. hold the single window lock). The class
  will obtain a write lock, but write locks can be nested.
* Moved SetWorkspacesCount() into the Desktop class.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-26 15:13:08 +00:00
Axel Dörfler
17c6d00009 Parameter "window" is now allowed to be NULL (this fixes a crashing bug I introduced earlier).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18617 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-24 20:45:22 +00:00
Stefano Ceccherini
1ff0b28a93 Uncommented invalidation of the area occupied by the views when they are added/removed from the tree. This fixes a couple of problems, I can't say the bug # because bugzilla is down ATM. Why was this code commented out? Stephan ?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18607 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-24 14:09:15 +00:00
Axel Dörfler
5c87242ea3 Improved the fake mouse-moved mechanism quite a bit:
* EventDispatcher now adopts the cursor position from the HWInterface upon
  assignment, so that even the initial cursor reports match the on screen
  visuals.
* The message was never sent because "target" in Desktop::_SendFakeMouseMoved()
  was never set.
* EventDispatcher::SendFakeMouseMoved() now accepts an EventTarget and no
  longer a BMessenger (fits better to the rest of the API).
* EventDispatcher::SendFakeMouseMoved() now sends out the exit transit message
  to the previous target directly (doesn't wait until the next actual mouse
  move), and updates the previous target as well, so that scrolling now
  works in that new window.
* This only partially fixes bug #762, though, as GetMouse() can still steal
  this mouse message (BTextViews do that in WindowActivated()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18596 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-24 08:49:21 +00:00
Axel Dörfler
524c811b5d Renamed HWInterface::GetCursorPosition() to CursorPosition() to match
the usual style.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18595 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-24 08:40:44 +00:00
Axel Dörfler
d479fa7ae4 Floating windows no longer flicker when moving a window to another workspace
using the shortcut keys (Alt-Fn).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-23 21:49:59 +00:00
Axel Dörfler
6474795008 SetWorkspace() now also move the subset windows of the mouse event window to
the new workspace - this fixes bug #755. Unlike floating windows, they aren't
even redrawn :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-23 21:21:45 +00:00
Axel Dörfler
85e2542930 Shouldn't try to move windows to top that aren't yet in the workspace
(a.k.a. floating windows) in SetWorkspace().
This fixes bug #211.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-23 20:11:36 +00:00
Axel Dörfler
258d8a3380 When building the update region on workspace switch, the mouse event window was
ignored even if it was not visible on the previous workspace (only normal windows
can be moved this way).
This fixes bug #765.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-23 12:20:28 +00:00
Axel Dörfler
93d0415885 * If a BView::SetMouseEventMask() arrived in the app_server after the mouse buttons
have already been released again, the temporary listener was still added.
  This fixes bug #727.
* No longer removes temporary listeners if there are mouse buttons left pressed; ie.
  if you press two buttons at once, the listeners are now only removed after you've
  released them both. This is not only more logical, it's also how BeOS behaves :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-11 14:24:42 +00:00
Jérôme Duval
c8bb68e11b when drawing a line, we check if the line is only one point, to even draw a line
this fixes bug #709, but it's not quite good in my opinion (Stephan, please could you review?)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18050 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-07-06 18:58:47 +00:00