Stephan Aßmus
05988bd35f
inactive workspaces are drawn with darker colors
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-21 11:43:11 +00:00
Stephan Aßmus
b23f4579af
fixed a debug message
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-21 11:42:26 +00:00
Jérôme Duval
599be43472
Implemented GetHasGlyphs support somehow (FT support is lacking)
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13766 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-19 15:22:55 +00:00
Stephan Aßmus
0d02a8aaba
fixed B_CMAP8 back to front buffer conversion (blue was missing)
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13757 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-18 23:13:42 +00:00
Michael Lotz
d1c86c04c1
Fixed some miss-allocation when getting the the workspace windows.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13754 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-18 17:48:32 +00:00
Axel Dörfler
83d1f41819
Fixed compilation with debug output turned on.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13744 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-18 10:34:25 +00:00
Axel Dörfler
39d30137dc
A call to SetSizeLimits() can change the window frame, so it's now updated, too (a separate FrameResized() message is sent anyway).
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13742 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-18 09:53:37 +00:00
Axel Dörfler
2ca990b801
Moved the RootLayer::LayerRemoved() call from the ServerWindow destructor to RootLayer::RemoveWinBorder().
...
ServerWindow printed the title in its destructor after freeing it (with debug output turned on).
Calmed it down a bit, too (disabled "listening on port...").
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13741 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-18 09:24:08 +00:00
Axel Dörfler
0e430ce96e
Fixed the crashing bug with BAlerts - have I already said that this code is a mess?
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13740 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-18 09:22:34 +00:00
Michael Lotz
a83bffa77a
Removed {set|get}_syscursor according to DW. Scratch that last sentence in the last commit, with this Appearance builds again.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13727 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-18 00:35:18 +00:00
Michael Lotz
2213782534
All cursor related changes:
...
* Moved setting the default cursor from ServerScreen to Desktop
* Getting the default cursor is now done using the CursorManager
* Removed outdated setcursor from SysCursor.cpp (we have a new implementation by now)
* Renamed SysCursor.cpp to CursorSet.cpp as that's what it is
* Moved headers/private/app/SysCursor.h to headers/private/servers/app/CursorSet.h
* Removed some unneeded header includes along the way
There remains {set|get}_syscursor now in CursorSet.cpp. Serverside for these are not implemented
and they are obvious hacks. Do we need to keep them?
Also this commit _would_ break Appearance, but 1) all the related code is currently commented out
with the comment "cursor set management belongs in another app" and 2) it is already broken
because of ColorSet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13726 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-18 00:22:08 +00:00
Michael Lotz
fc6c82dc35
Cleanup and style changes. Removed global cursormanager as each RootLayer has it's own.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13724 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-17 21:26:28 +00:00
Axel Dörfler
ef8810f2ad
Extracted the settings stuff from the Desktop class. If you now need to access
...
the desktop's settings, you have to do something like this:
DesktopSettings settings(desktop);
settings.SetMouseMode(mode);
The advantage of this is that this object is fully locked, and cannot lead to
corrupted settings anymore. Also, the settings will stay the same until you
delete the object again.
Updated all accesses to use this new API.
Removed no longer used FFM messages.
Implemented AS_{GET|SET}_MENU_INFO for future use.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13719 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-17 16:25:48 +00:00
Axel Dörfler
67d3b755ec
Fixed a stupid bug in ReleaseScreen(); caused an endless loop.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-17 16:11:27 +00:00
Stephan Aßmus
d461b955a1
fixed my previous commit, it helps to read the diffs again... but this fallback needs to move somewhere else, as commented by the TODO
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13706 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-16 23:43:30 +00:00
Stephan Aßmus
bcdb0e9460
some useful leftovers from debugging, use new with nothrow for it to make sense to test the returned pointer
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13704 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-16 23:34:23 +00:00
Stephan Aßmus
657ff50ca9
fall back to double buffered mode was already workingif mode was not 32-bit, only that IsDoubleBuffered() was not implemented, so that HWInterface::DrawingBuffer() returned the front buffer, which had the non-32-bit format... so this fixes non-32 bit modes, IAW, Vesa is working now
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13703 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-16 22:54:25 +00:00
Stephan Aßmus
95e42caf13
tried to find the bug that causes the wrong area underneath the software cursor to be restored, but failed, the only accomplishment is that the cursor is now showing right from the beginning, not only after one moves the mouse
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13702 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-16 22:52:28 +00:00
Stephan Aßmus
c18d3059b4
added icons needed for BAlerts
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-16 22:50:43 +00:00
Stephan Aßmus
05ffbfbc24
_FindMode is now more robust and really tries everything it can to find a mode...
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13700 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-16 22:50:17 +00:00
Stephan Aßmus
821426f66e
forgot to remove debug output
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-16 22:49:17 +00:00
Axel Dörfler
fd5bec1e48
First baby step to a restructured app_server:
...
- introduced new ScreenManager and VirtualScreen classes
- removed screen handling from RootLayer
- removed multiple screen/root layer stuff from Desktop, it's
now using a VirtualScreen object instead
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13686 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-15 12:45:23 +00:00
Stefano Ceccherini
16046321cc
Implemented BPrivateScreen::ReadBitmap(), but the guts are still missing
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-13 22:33:52 +00:00
Michael Lotz
13b42e5eb4
Just some style cleanups again. Sorry I couldn't resist, won't happen again ;-).
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-12 17:41:22 +00:00
Michael Lotz
3f319b3346
Some cleanup, some removed typos, some unification, some fixes and some added todos. Most of it related to client-server communication. Apps that rely on BFont stuff should work now (StyledEdit, Fonts, Keymap, Menu, ...). Or should not hang/quit at startup at least.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-10 21:16:43 +00:00
Stephan Aßmus
642467d077
renamed the tree parsing/child iteration functions, I think it is much clearer now what they do, more likely to find bugs too
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13572 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-10 17:16:31 +00:00
Jérôme Duval
7e79718c2b
install_fonts isn't useful anymore
...
fonts are now installed as part of other data files
we still install some host fonts if found
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-08 12:35:07 +00:00
Jérôme Duval
6f1735a73a
moved fonts in data/etc/
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13556 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-08 12:11:56 +00:00
Stephan Aßmus
39e4b4ada6
quick fix to have Tracker display icons, hope this still reaches you, Axel
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-08 08:48:24 +00:00
Axel Dörfler
3182843008
No longer draws the desktop window.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-08 00:38:52 +00:00
Axel Dörfler
1f56ada26a
New windows are now activated again - temporary fix, won't work with FFM.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-08 00:11:39 +00:00
Stephan Aßmus
a5ca645e49
when a Layer or WinBorder is deleted, the RootLayer gets a chance to set some important pointers it keeps arround to NULL. It is not unlikely that this improves stability a bit.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-07 14:04:29 +00:00
Stephan Aßmus
4ed0f43872
checks rootLayer Pointer, since offscreen windows are not attached to RootLayer. This shouldn't have been a problem though since Offscreen windows were never Show()n
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13515 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-06 23:24:03 +00:00
Axel Dörfler
16e938888d
Some more debug output, so that you know which window is killed this way.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-06 22:40:01 +00:00
Axel Dörfler
806767ec21
It now deletes its message port (it was previously incorrectly deleted by the client).
...
Now handles it gracefully if someone deletes its message port (it will try to close
the client and quit).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-06 22:39:15 +00:00
Axel Dörfler
189ba7a9dc
Tried to separate active WinBorder from front, but failed - it's now always
...
the focus border, and therefore, I probably broke floating windows (but that's
not that important right now).
Workspace::HideWinBorder() now sets focus to the next WinBorder, not always
the top one.
Workspace::MoveToFront() no longer changes focus, no longer calls ShowWinBorder()
when the window doesn't have to be moved (ie. for the desktop window).
Added Workspace::SetFocus() to change the focus explicetly.
Some other cleanup. This is an ugly patch, but refactoring/rewriting is coming
soon.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-06 20:19:22 +00:00
Stephan Aßmus
6c3f99cf46
the clipping in fLayerData is in screen space, so when getting/setting the user defined clipping, we need to convert to/from view space
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13505 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-06 18:05:56 +00:00
Axel Dörfler
063c980a2d
Minor cleanup: we have a constant for the desktop window feel.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-06 16:26:53 +00:00
Stephan Aßmus
72fab80539
another quick change for Tracker which allows to click on the Deskbar window, for some reason the window manager implementation does not allow a B_SYSTEM_LAST window to become the focus, but this is clearly possible on R5. I tried to track the real problem, but it needs to at least appear to work tomorrow... so double clicking on the Haiku volume indeed opens a Tracker window, though there is nothing in there. Axel, when I launch Tracker, I'm getting a bunch of KDLs with PANIC: BFS where I can continue until finally seeing Tracker. Deskbar works even better, though displaying the BeOS Logo is IMHO unacceptable for the representation, so I'm intending to make a Haiku Deskbar logo ASAP.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-06 13:31:41 +00:00
Stephan Aßmus
25685e7e5f
this quick change will make sure the Tracker Desktop window is opened behind all other windows and stays there, just to make life easier for Axel when I is representing the thing...
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-06 13:25:43 +00:00
Stephan Aßmus
101e7104ed
fixed screenshots. Again.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13484 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-06 10:21:23 +00:00
Axel Dörfler
c9299b3ce8
Instead of killing the ServerApps the hard way, the AppServer now quits
...
them if they didn't listen to B_QUIT_REQUESTED. This works much better
as how it was done before.
Now uses exit() instead of exit_thread() which makes sure no thread survives.
Note, there still is a race condition in case an application quits immediately
before shutting down the server - in that case, it doesn't participate in
the fShutdownSemaphore stuff, and therefore, the app_server could quit it
too early. Maybe I'll fix that one day, as well :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-06 04:57:57 +00:00
Axel Dörfler
c8e986230f
Incorrectly used real_time_clock() instead of system_time() for the message time stamps
...
(change suggested by stippi).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13476 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-06 02:48:13 +00:00
Stephan Aßmus
8ffa3fb9fa
the official system palette also has the 0xff entry (B_TRANSPARENT_MAGIC_CMAP8) with alpha = 0
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13474 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-06 01:46:37 +00:00
Stephan Aßmus
53a3e62c74
quick hack for alpha = 0 in B_OP_OVER, needs review, but for now, drawing all those B_CMAP8 bitmaps which have B_TRANSPARENT_MAGIC_CMAP8 pixels is working fine... IAW, icons look cool.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13473 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-06 01:43:49 +00:00
Axel Dörfler
5c228514df
Made the border line darker for B_BORDERED_WINDOW_LOOK - menus look much better now
...
(but should still have their own look that includes the bevel, I think).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 23:10:08 +00:00
Axel Dörfler
34ce0e42d4
As it turns out, window_info::type is really the window's "feel".
...
Basic support for the desktop window feel: WinBorder will now resize
a window with kDesktopWindowFeel to span over the whole screen.
Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13462 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 20:28:40 +00:00
Axel Dörfler
2b1246d968
Renamed AS_WINDOW_TITLE to AS_SET_WINDOW_TITLE.
...
Fixed handling in ServerWindow as stippi's latest commit broke it.
It's now properly done with a separate ServerWindow::SetTitle() method,
that will also take care to rename the window's thread.
Changed naming the window thread in the app_server to "w:<team>:<title>".
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13461 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 19:20:19 +00:00
Axel Dörfler
4902831aca
Fixed the newly introduced hang when a menu item was selected (which was only one
...
of the consequences): a forgotten rootLayer->Lock()...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13458 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 18:46:59 +00:00
Axel Dörfler
0bb8508592
Stippi's commit accidently changed the initial screen size.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13457 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 18:38:12 +00:00
Axel Dörfler
6a0a0a80da
Implemented AS_GET_WINDOW_LIST and AS_GET_WINDOW_INFO.
...
Renamed Desktop::FindWinBorderByServerWindowTokenAndTeamID() to FindWinBorderByClientToken().
Every ServerWindow now gets a server token.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13455 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 18:14:24 +00:00
Stephan Aßmus
359c905c57
offscreen bitmaps work, tested on Haiku as well, supports all colorspaces that BBitmap::ImportBits() supports. It uses a fallback for non-B_RGB(A)32 bitmaps. Added support for B_SUB_PIXEL_PRECISION view flags, though it is a bit hacky, since I had to add it to LayerData, even though it is not a true part of stack data. Added Layer::SetFlags() to enforce code path and update fLayerData. Cleaned up DisplayDriverPainter and DisplayDriver API (changed some const BRect& rect to simply BRect rect in order to be able to reuse it in the code), moved Painter.h, the test environment only draws the changed part of the frame buffer again - this causes a lot less CPU overhead, Painter special cases stroke width of 1.0 to use square caps, which is similar to R5 implementation and removes a lot of problems with non-straight line drawing, ServerWindow uses the DisplayDriver from it's WinBorder instead of the one from the Desktop (needed for offscreen windows, which have their own DisplayDriverPainter), it also checks for GetRootLayer() == NULL, because offscreen layers are not attached to a RootLayer, there was a fix for scrolling which worked at least in the test environment, it is now defunced, because Adi moved _CopyBits to Layer... I need to reenable it later, LayerData has no more fEscapementDelta, also fixed fFontAliasing (which was thought to overriding the font flags, and now works as such again), Desktop initialises the menu_info and scroll_bar_info stuff, which makes ScrollBars work actually... hope I didn't forget something.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13448 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 16:17:16 +00:00
Axel Dörfler
f5d8fa6e60
AS_LAYER_GET_CLIP_REGION missed a Flush() in case the view was not hidden,
...
and that put apps that used it to sleep (for example, Tracker is using it).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 01:19:01 +00:00
Axel Dörfler
b1e04bcb5c
The app_server now also quits fast in case there are no apps to quit... :-)
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 01:02:32 +00:00
Adi Oanca
be2eea8cf9
implemented hooks for resizing and moving operations. BViews now resize corectly in Playground app. Ignore the Convert*() stuff.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-02 10:40:14 +00:00
Adi Oanca
4a9bbc7d20
addapted to new clipping code
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13398 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-02 10:37:53 +00:00
Adi Oanca
b72bef8630
Added Flags(), ResizeMode(), made virtuals be prototypes only.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-02 10:36:24 +00:00
Axel Dörfler
bc1a7f9f09
Now prints out a message when the window title should be set.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13392 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-01 18:29:20 +00:00
Axel Dörfler
1b36d9d743
The TEST_MODE and non-TEST_MODE code is now the same, only the modifiers/keys
...
are different. Therefore, workspace changes should work on real hardware as
well now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13387 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-01 11:22:58 +00:00
Axel Dörfler
c030c6fa68
As the comment says, deleting the cursor is not necessary.
...
But since every single cursor is owned by a team - why the cursor manager?
I must overlook something...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13385 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-01 10:13:50 +00:00
Axel Dörfler
3870c9f18f
Improved quit mechanism (for the last time): if an application had open
...
windows that wouldn't quit on demand, the app_server would have gotten
the kShutdownServer message anyway already (as the last app was quit).
Since that one removed things like gDesktop/gBitmapManager, it liked
crashing.
Now, there is a semaphore that will be send to each app on quit. Only
when this semaphore can be acquired, the shutdown message will be sent.
Removed unused semaphores (decorator, active app).
Replaced fAppListLock with a BLocker (just calling acquire_sem() without
error checking is very unsafe in userland, and should never be done).
BTW the bug was triggered by broken menu code that only sometimes
really quit the window; it leaves a whole lot of zombies around - Stefano,
any quick idea? :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13384 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-01 10:09:11 +00:00
Axel Dörfler
37fa302a92
Also commented some unimplemented message handler to not break the reply mechanism.
...
The ServerWindow did not even have such a mechanism anyway... (it now has).
Minor cleanup, replaced some "delete" with "delete[]" where appropriate.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13382 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-01 08:50:45 +00:00
Axel Dörfler
1e1b96cdc1
Rather than a "case message: /* unimplemented */ break;", we should not
...
handle the case at all to give the server the possibility to send a
failure response - ifdef'd some code out.
Added comment to ServerApp::PingTarget(), because what it currently does
does not make any sense.
Minor cleanup (replaced fSignature.String() with Signature()).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13381 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-01 08:48:51 +00:00
Axel Dörfler
1786706696
You're not supposed to delete bitmaps yourself; you have to let the
...
bitmap manager do the job.
This fixes a possible crashing bug on quit, a giant memory hole, and
probably also a possible crash during runtime.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-01 08:10:42 +00:00
Axel Dörfler
5712a788a1
WorkspacesLayer now makes use of DisplayDriver::ConstrainClippingRegion() in
...
order to flicker less (which works, but it's not really that nice yet, as
it currently only works for the background).
The workspaces layer is now also invalidated if a new window appears on the
screen or goes away (also when this happens in another workspace).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13379 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-01 07:58:22 +00:00
Axel Dörfler
24a146d4f6
Small hack to get to know the code a bit better.
...
A view-only workspaces window support (with lots of drawing flicker) - this
means you see what happens in the workspaces, but it doesn't do anything if
you click on it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13378 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-01 06:53:07 +00:00
Axel Dörfler
f598d348b1
A window thread is now called "w:<title>" instead of just "<title>".
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13376 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-01 06:44:39 +00:00
Axel Dörfler
b7596f59ec
AS_LAYER_GET_STATE no longer sends stuff that doesn't belong to the layer's state.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13335 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 23:03:28 +00:00
Axel Dörfler
3783821c25
Fixed B_CONTROL_HIGHLIGHT_COLOR/BORDER_COLOR. Changed highlight color from Dano value
...
to something for R5 (ie. what DiskProbe is using).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13333 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 21:52:32 +00:00
Axel Dörfler
80a230b10e
Rewrote the push/pop state and ViewAttr stuff:
...
- it now seems to work finally correctly
- renamed ViewAttr to ViewState and put it into the BPrivate namespace
- some refactoring (moved some private BView methods to ViewState)
- renamed AS_LAYER_MOVETO/RESIZETO to *_TO (note the underscore)
- exchanged BView::originX/Y with fParentOffset (BPoint)
- divided AS_LAYER_GET_COLORS into separate ones for high/low/view color
- BView::SetPattern() now actually works as expected (ie. updates
only if necessary)
- exchanged the ViewAttr::flags with ViewState::valid_flags which inverses
the previous logic (which wasn't even used consistently)
- fState was initialized twice (incorrectly by the ViewAttr constructor,
and then again correctly by initCachedState()) - now the ViewState
constructor does the job alone, but correctly
- BView::PushState() no longer resets the state (it did so only locally
anyway...)
- cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13325 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 18:56:55 +00:00
Adi Oanca
f97b5cb586
Moved CopyBits from ServerWindow to Layer. Also, made CopyBits code execute in RootLayer's thread
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 15:34:54 +00:00
Adi Oanca
1302949204
Layer::Show/Hide now works. Improved some invalidating calls. fixed some potential problems
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13317 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 14:57:16 +00:00
Adi Oanca
ecf3bc3eb4
moving and resizing windows works with the new clipping code. scrolling BViews also works.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13311 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 12:25:32 +00:00
Axel Dörfler
a87826801c
Added workaround for current stability problems of the app_server: giant lock,
...
say hello to RootLayer.
Adi will probably not like this, but that's definitely only a temporary solution :-)
This little fix greatly increases app_server stability under Haiku - ie. menus
are working now, the team monitor comes up regularly, etc. - how great is that?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13305 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 03:23:16 +00:00
Axel Dörfler
276aa135a7
The size limits are now correctly enforced on window creation, ie. the ResizeLimits
...
test application now works as it should.
DefaultDecorator::GetSizeLimits() did work correctly, there was no need
to have extra protection limits.
Enabled Stephan's automatic resize code on BWindow::SetSizeLimits() again, and
added a short comment why I think R5's behaviour is just a bug/leftover.
Moved guts of ResizeBy() into _ResizeBy() that doesn't send the update message
to the client, and is now called in the constructor to make sure the border
size is within limits. Also made it work there, as fTopLayer is NULL in that
environment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13304 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 02:00:48 +00:00
Axel Dörfler
85bd83a710
AS_CREATE_WINDOW now also gets the actual frame width and size limits of
...
the window on server side - ie. if the app_server could not create a
window of the size requested, BWindow::fFrame will still be correct
(and the size limits will mirror actual decorator limits).
Renamed fMinWindHeight and friends to fMinHeight and so on.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13302 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 01:14:39 +00:00
Axel Dörfler
c17904c587
The B_WINDOW_RESIZED message now looks exactly like it does under R5, ie. has a "when" field, too.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13300 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 00:53:41 +00:00
Stephan Aßmus
f8570b7199
substract the border width from minSize, as that is the inner width of the window
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 00:34:51 +00:00
Stephan Aßmus
063f418c53
made room for a new meaning of BitmapBuffer, it will be used for a RenderingBuffer class that wraps arround a ServerBitmap. BBitmapBuffer on the other side is handy as well and wraps arround a BBitmap, as BitmapBuffer did before.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13297 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-27 22:11:27 +00:00
Stephan Aßmus
203661c9d0
svn does not do what I want before I commit this... It's going to be renamed
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13296 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-27 21:53:17 +00:00
Stefano Ceccherini
9f5ffc2c3c
Fixed BFont's GetTunedCount() and IsFixed()
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13293 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-27 15:44:47 +00:00
Axel Dörfler
08d9a6e30d
Some minor work on minimum window sizes. A WinBorder now makes sure it has
...
a valid size on construction; DefaultDecorator should do that as well.
ServerApp AS_CREATE_WINDOW now makes sure it passes a valid rectangle to
ServerWindow's constructor.
Smaller default size for Layers that have been created with an invalid frame.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13291 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-27 02:06:15 +00:00
Stephan Aßmus
18cbc4ff3d
Using the read locking in DisplayDriver was a bit early. Painter itself is not thread safe, so while we use the HWInterface lock for locking, we can only do read locking once each window has its own Painter instance. I'm still investigating this possibility. It depends on the memory foot print of painter, of which I don't have a clear idea yet. Anyways, this quick change fixes Adis problems and is required at this time anyways. Sorry for the inconvenience.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13278 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-25 22:56:24 +00:00
Adi Oanca
e3fbc7752f
integration of the new clipping code continues
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13277 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-25 15:45:58 +00:00
Stefano Ceccherini
d06e1bff11
Fixed array initialization.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13276 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-25 14:13:30 +00:00
Stefano Ceccherini
89d0b3cdad
Safer code
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13275 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-25 13:58:55 +00:00
Stefano Ceccherini
55b222b0b0
Stephan already implemented the needed support for dpms stuff too, so why not implementing the client methods too?
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13274 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-25 13:53:48 +00:00
Adi Oanca
e603410b82
- simplified a little the update code/process.
...
- moved part of the update code from Layer to WinBorder. Fits better
there.
- renamed a couple members.
- some cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13273 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-25 13:09:19 +00:00
Adi Oanca
b62270533e
removed a printf
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13272 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-25 08:47:51 +00:00
Adi Oanca
94fa2bd256
inlined a few methods in header file, otherwise app_server would not build
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13271 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-25 08:45:00 +00:00
Stefano Ceccherini
75de27f83b
more BScreen related stuff
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13270 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-25 06:30:09 +00:00
Stefano Ceccherini
583f6c3eba
Added server side support for BScreen::ProposeMode(), fixed client side too.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13269 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-25 05:58:43 +00:00
Stefano Ceccherini
c641898150
implemented client/server side support for BScreen::GetDeviceInfo() and WaitForRetrace(), and (only client side) support for Bscreen::ProposeMode()
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-24 18:02:01 +00:00
Axel Dörfler
0ec4af2233
Improved AreaPool to have an initial size as well as well as a name that is
...
used for new area.
MemPool::AddToPool() now gracefully deals with NULL pointers (or a size of 0).
BitmapManager was deleting the area it transferred to AreaPool before - it
no longer needs an extra area, though.
Minor other cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-24 04:01:16 +00:00
Axel Dörfler
b5436616a3
Fixed some style related functions and other oddities in FontServer.
...
Also applied our style guide on that class.
Renamed some public globals to match our style guide.
Made BitmapManager inherit from BLocker instead of duplicating its
functionality (incorrectly, did not check for B_INTERRUPTED) locally.
Some more cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13259 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-24 03:31:41 +00:00
Axel Dörfler
5029b563fd
Fixed pretty much broken AreaPool - I am not sure this class is that a good idea, anyway.
...
area_for() is not the cheapest call; the user better knows the area and deletes it directly.
Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13257 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-24 02:13:32 +00:00
Stephan Aßmus
2949ed1def
Thou shalt compile before thou commitst.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13253 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-24 00:14:19 +00:00
Stephan Aßmus
3dcb3b079a
Added some root layer locking in ServerWindow.cpp when accessing the layer tree. Moved HWInterface management out of DisplayDriverPainter and into Desktop. Removed all the directly hardware related functions from DisplayDriver API. They just called the same HWInterface functions. Now DisplayDriver is much cleaner and ready for being attached to a yet to be written BitmapHWInterface. Clean up of the display mode stuff in Screen and the View-/AccelerantHWInterface. Frequency is now regarded on Haiku. AccelerantHWInterface::GetModeList now works before SetMode has been called. Added MultiLocker from the sample code. HWInterface uses it now in preparation to being used from multiple instances of DisplayDriver.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-23 23:46:17 +00:00
Axel Dörfler
1b53e8af26
The app_server now cleans up better after a team crashed; not only the
...
application and bitmaps are removed, the team's windows are now removed
as well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13251 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-23 23:21:10 +00:00
Stephan Aßmus
c69d4b2719
clean up, bug fixes and more robustness
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13249 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-23 23:14:40 +00:00
Stephan Aßmus
ee9b01a01a
made the pool allocator thread safe
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13248 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-23 23:13:09 +00:00
Axel Dörfler
ce1639b2bf
Some more cleanup:
...
- replaced fMsgSender/Receiver with a BPortLink fLink
- moved message loop into non-static method _MessageLooper()
- renamed Zoom()/Minimize()/Quit()/ScreenModeChanged() to Notify*(), and
Quit() to NotfiyQuitRequested() to make more clear what they do (they
don't operate on ServerWindow, they just notify its client)
- less insane way to init a window: there is no longer the constructor
and a separate method Init(); now there is the constructor (which
fully sets up the window), InitCheck(), and Run() which runs the
window's message loop
- moved the quitting stuff into a separate method Quit() and made
it callable from other threads.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13247 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-23 22:43:11 +00:00
Adi Oanca
4801a9a97d
Fixed the problem Axel signaled with hidden views
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13246 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-23 21:23:01 +00:00
Adi Oanca
8734d03e14
removed 3 printf(s) that I intruduced in my last checkin
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13244 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-23 19:30:29 +00:00
Axel Dörfler
a38e46a046
ServerApp now maintains a list of all windows, ServerWindow's AS_DELETE_WINDOW
...
will update it automatically.
Renamed ServerWindow::fName to fTitle, made it a pointer - it will now just
adopt the title pointer that came from AS_CREATE_WINDOW.
Just another cleanup round: renamed Layer::GetName() to Name(), no
more layer->fName->String() accesses.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13239 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-23 18:48:10 +00:00
Axel Dörfler
fcb006dcf5
Rewrote how the app_server and ServerApp's quit. As a side effect, the server
...
can now quit instantly.
AppServer must no longer call ServerApp's destructor once it's running - it now
has to call Quit() in this case. The ServerApp is now destructed in its own thread.
Some cleanup (like renaming ServerApp::MonitorThreadID() to Thread()).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13238 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-23 17:40:35 +00:00
Axel Dörfler
2e86adec11
Implemented AS_GET_MODE_LIST server side.
...
Fixed broken ViewHWInterface::GetModeList() - it did not correctly write into
the allocated memory. Also extended it to be more flexible, has better timing
values, and more resolutions.
ViewHWInterface::SetMode() will now check if the requested mode is in its
list of supported modes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13226 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-22 18:14:13 +00:00
Adi Oanca
3df649ecb3
managed to show/hide empty windows with the new clipping code
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13221 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-21 20:11:44 +00:00
Stefano Ceccherini
3255e7df2c
I hope no one believed that these methods could've really been inlined...
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13216 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-20 10:33:34 +00:00
DarkWyrm
550d6a5375
Cleanup for decorator management code
...
Updated a couple headers
Moved all decorator code to ServerApp where it belongs
Modified AppServer::Broadcast to allow ServerApps send messages to all apps without having to have a global AppServer instance
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-17 19:10:15 +00:00
Axel Dörfler
1b5aeb312e
Renamed class FMWList to SubWindowList. Cleaned up SubWindowList a bit.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-17 16:34:22 +00:00
Stephan Aßmus
2734243aca
Preparation of more correct support for state stack.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-17 13:20:45 +00:00
Jérôme Duval
587e093725
reworked registrar launch wait, avoids snoozing
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-16 22:30:50 +00:00
Adi Oanca
5fcce1f54b
renamed a few members so that I don't have problems later. removed more methods/members
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13190 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-16 20:43:53 +00:00
Adi Oanca
e0911bbb29
yes, yes... removing unneeded methods/members.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13188 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-16 19:44:55 +00:00
Adi Oanca
83265d84db
More work for integrating the new clipping code.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-16 18:58:14 +00:00
Stephan Aßmus
faaa62c751
update cached HW acceleration flags on mode changes. Fixes HW acc on ATI after Axels changes. Axel, is it working on Matrox as well now?
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13180 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-16 15:10:24 +00:00
Stephan Aßmus
54cc0f1b56
reverted some unintentional changes
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13179 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-16 13:07:36 +00:00
Stephan Aßmus
99b9d5ac8a
a new state begins life as a copy from the previous state, fixed Scale(). Note that BoundsOrigin() (and therefor Scale()) is called _a lot_ so we should cache the value! I started to work on this, but our lack of encapsulation strikes again... Layer::fLayerData is used directly all over the place.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13172 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-16 12:32:42 +00:00
Axel Dörfler
53442520cc
Fixed a bad bug in the app_server:
...
fCurrentLayer was used to determine to which layer a new one would be
added to, but BView::AddChild() would only set this correctly for the
current view, ie. all children of the new child were added to the
wrong layer in the app_server.
Now, AS_LAYER_CREATE sends the parent's token to the server, and the
server relies on this to build the layer hierarchy.
All of a sudden a lot of hidden views are visible now. I noticed the
bug while refactoring the task manager, but a lot of apps were affected.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13164 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-16 00:46:02 +00:00
Adi Oanca
d41a1e80b8
Integrated the new clipping code. It compiles but it does not work yet. Do not worry, it's guarded by a #define :-)
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-15 20:36:43 +00:00
Adi Oanca
0f0232c767
Started adding new clipping code - not active ATM. Removed Virtual prefix
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13159 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-15 19:01:43 +00:00
Adi Oanca
524c020956
Bounds() takes into account previous pushed states
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13157 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-15 18:47:41 +00:00
DarkWyrm
e67e7dd995
Some cleanups to ColorSet in anticipation of future cleanups for Appearance app
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13156 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-15 17:20:17 +00:00
Stephan Aßmus
cf5ff0c0d0
fixed memory corruption in the stuff I added to moreUTF8. This fixes GetEscapement crashes. The rest of the file needs reviewing as well, but I wanted to commit this ASAP
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13155 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-15 17:09:00 +00:00
Axel Dörfler
dd10337fd0
Renamed BAppServerLink to AppServerLink, BPortLink to PortLink, LinkMsgReader
...
to LinkReceiver, LinkMsgSender to LinkSender, and put everything into the
BPrivate namespace.
Made AppServerLink a cheap object - it will use the applications receiver/sender
and not create its own buffers.
Fixed broken communication stuff here and there (mostly Font.cpp).
Put the newly introduced set|get_system_colors() into the BPrivate namespace -
please don't introduce private functions into the public namespace!!!
Also fixed their broken communication use, as Darkwyrm obviously forgot about
it again: the sequence Flush(); GetNextMessage() without error checking is
purely wrong and can make the app hang and/or crash! :-)
Other minor cleanup.
The input_server used some test mode with the haiku build target which is
probably wrong.
Hopefully I did not forget anything this time.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13128 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-14 21:28:56 +00:00
DarkWyrm
57bbc53987
Moved some system colors code to be monitored by a client's ServerApp
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13123 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-14 19:48:30 +00:00
Stefano Ceccherini
6deb7c6749
Documented the public methods, changed the file description
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13111 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-14 07:29:16 +00:00
Stephan Aßmus
75d26e104a
fInitialized is also set in the copy constructor. BTW, the Haiku Logo is displayed now (forgot to commit this earlier). Thanks to Axel for finding out about this.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13110 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-14 00:38:21 +00:00
Axel Dörfler
6262418e6a
fInitialized was never set to "true", so InitCheck() could never succeed.
...
Also fixed _AllocateBuffer() to handle out of memory situations gracefully.
It should probably also have upper limits with regard to the bitmap size.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13109 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-14 00:12:45 +00:00
Stefano Ceccherini
3a27ae791e
Added server support for activate_workspace(). Looks like it's not doing anything, though SetActiveWorkspace() returns true....
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13103 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-13 22:11:29 +00:00
Stefano Ceccherini
eef16dda7d
implemented server support for current_workspace(), just because I had enough of the 'blablah got unknown reply' message
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-13 21:54:11 +00:00
Axel Dörfler
aadb0f6bb8
The acceleration hooks are now set after a SetMode(), and get a display_mode as parameter
...
as required by the interface.
Unfortunately, this doesn't help the slow window moving with Rudolf's drivers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13099 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-13 17:42:52 +00:00
Stefano Ceccherini
d039af7469
Reverted to the previous algorithm, which is just another version of the same one: they produce slightly different results, but this one should be faster as it doesn't use divisions.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13097 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-13 15:29:08 +00:00
Stefano Ceccherini
44bb301774
Improved some more.
...
Why were the components or'ed with 5 ?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13096 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-13 14:42:06 +00:00
Stefano Ceccherini
6ec6f3f831
Better color distance-measuring algorithm, taken from here:
...
http://www.stud.uni-hannover.de/~michaelt/juggle/Algorithms.pdf .
Still not 100% identical to be's one, but much closer.
Small cleanups.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13091 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-13 13:22:50 +00:00
Stefano Ceccherini
1f1ed1c62c
Generate the inversion map.
...
Note that the inversion_map and the index_map aren't the same as in Beos, due to bugs (or different behaviour) in color_distance.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13086 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-13 10:28:51 +00:00
Stefano Ceccherini
509db2a318
Generate the index map using some code stolen from BBitmap. The Mandelbrot sample app starts looking good. Only the inversion map is missing now
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13079 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-13 05:03:42 +00:00
Stephan Aßmus
9851ab5c1e
The Haiku Logo is displayed on the Desktop. :-) Of course this will be removed as soon as Tracker runs. If you don't want it, you can disable it in RootLayer.h. Fixed a clipping bug with text rendering.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-11 13:00:17 +00:00
Adi Oanca
b81c5513c5
addapted code as a result of removing viewColor, background and overlay bitmap members from LayerData
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13051 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-10 16:20:38 +00:00
Stefano Ceccherini
2c9931e911
no more friends for ServerWindow... Poor ServerWindow
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13048 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-10 15:56:55 +00:00
Stefano Ceccherini
7cb5e7b146
removed another friendship
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13045 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-10 15:50:24 +00:00
Stefano Ceccherini
e1bc5f2def
Added Layer::Push/PopState() and moved their implementation from ServerWindow.cpp. We definitely need more encapsulation
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-10 15:28:34 +00:00
Stefano Ceccherini
f1496739a3
removed AS_SET_SCREEN_MODE handler
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13040 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-10 08:29:49 +00:00
Stefano Ceccherini
2ed35bc88c
Thanks to Axel's change, now we can pass the app_server's colormap to libbe. Methods like BScreen::ColorMap() and BScreen::ColorForIndex() work.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13023 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-09 04:36:00 +00:00
Axel Dörfler
e60b1ff1d8
Reserved space for the close and zoom buttons, even if they were absent.
...
Hack workaround: enlarged the text width a bit, because the title often appeared
truncated for no apparent reason.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13012 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-08 14:35:25 +00:00
Axel Dörfler
3ba7d6f350
Added AS_{GET|SET}_DESKTOP_COLOR.
...
(Incorrectly) implemented AS_GET_DESKTOP_COLOR - works for now.
Minor cleanup.
Is AS_SET_SCREEN_MODE used at all?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13010 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-08 13:24:40 +00:00
Axel Dörfler
bd28b3c746
BAppServerLink is now using BApplication::fServerTo/From for its messaging.
...
Added LinkMsgReader::NeedsReply() method.
Completely redone ServerApp messaging: no more "replyport" from BAppServerLink; instead,
the registered client reply port is used. Fixed some more weak messaging stuff.
ServerApp now recognizes if an unknown message needs a reply, and sends it - for example,
the "Screen" preferences app no longer hangs, but crashes on start :)
Made LinkMsgReader::Read() virtual again, since it's needed by RAMLinkMsgReader.cpp.
Renamed BPortLink::GetNextReply() to GetNextMessage().
Some more cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13004 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-08 04:01:59 +00:00
Axel Dörfler
0aa69a9cd4
Fixed the crashing bug when quitting the app_server.
...
The display driver is now owned by the Screen object.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13002 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-08 01:40:22 +00:00
Axel Dörfler
d673482488
Under Haiku, the "stub" driver is called "vesa", so we're trying to use this one.
...
Note, the special case can go as soon as we've moved the driver over to the new
driver architecture.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-08 01:39:14 +00:00
Axel Dörfler
75936a02e4
BPortLink now has a FlushWithReply() method itself.
...
BPortLink::AttachString() now accepts a length argument, and will no longer
send a terminating null byte; LinkMsgReader::ReadString(), however, will
make sure the string read is null terminated.
Changed client communication code to use FlushWithReply() instead of Flush()
and GetNextReply() - there were many bugs and shortcomings in the code, I
hope I've fixed them all.
Converted ClientFontList.cpp to our coding style (but not completely, the
class members are missing).
Some more cleanup - I hope Adi will adopt our coding style one day!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12998 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-08 00:36:26 +00:00
Stefano Ceccherini
7475dcdf3a
Added an app server command to retrieve the color map. Made some adjustments to SystemPalette.cpp, implemented support for it in BPrivateScreen. Moved get_scs() a bit down to avoid a deadlock. Note that getting the colormap doesn't work due to port capacity limit (?)
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12996 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-07 21:32:24 +00:00
DarkWyrm
47a1e5d189
Implemented the settings functions
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12966 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-07 01:29:12 +00:00
Stephan Aßmus
457820a6ef
quick fix for windows resizing/moving at fractional offsets, fix for bitmap drawing placement, small clean ups
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12961 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-05 22:02:25 +00:00
Stephan Aßmus
6a2575c9d2
fixed resizing of hidden windows
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12953 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-04 11:18:30 +00:00
Stephan Aßmus
f9e3895bf2
added tracing to some messages
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12952 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-04 11:17:30 +00:00
Stephan Aßmus
59345e264f
huge cleanup, support for SetSizeLimits, support for truncating strings, numerous decorator bug fixes, Layer does not draw when view color is B_TRANSPARENT_COLOR, cleaner dispatching of mouse events to the WinBorder in RootLayer, commented the char map selection in the font server, as it seems glyph lookup by unicode index works much better with the default map
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12945 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-03 19:50:30 +00:00
Stephan Aßmus
e4f0f510a9
added support for non-antialiased text rendering, cleanup in AGGTextRenderer
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12944 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-03 19:33:11 +00:00
Stephan Aßmus
7aca21e6bf
added const to some operators
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12943 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-03 19:31:26 +00:00
Stephan Aßmus
11f97ed147
large cleanup, should have fixed some memory leaks too
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12942 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-03 19:30:32 +00:00
Stefano Ceccherini
45ca1c948c
Simplified code for BView::ClipToPicture() a lot (both server side and client side). Regions passed with that method should take the place of regions passed with BView::ConstrainClippingRegion(). Note that the needed server support hasn't yet been implemented.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12939 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-03 14:20:10 +00:00
Jérôme Duval
5afe056c71
added a snooze, input_server is well started by app_server this way
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12924 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-01 22:41:22 +00:00
Stefano Ceccherini
f39e1df2de
delete -> delete[]
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12918 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-01 08:55:39 +00:00
Axel Dörfler
c88974d026
The app_server now updates the kernel's blue screen frame buffer on mode changes
...
(only the accelerant HW interface does this for now).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12897 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-29 20:23:00 +00:00
Stefano Ceccherini
19e4729202
Uncommented SendMessageToClient, as it's used in test mode.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-28 16:58:25 +00:00
Stefano Ceccherini
8380e999e7
better error checking in Run()
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-28 14:00:15 +00:00
Stefano Ceccherini
6390df8e27
Made app_server a static, renamed desktop to gDesktop as it's a global, RootLayer now uses its own fDesktop internal member instead of the global one. Fixed a typo in some commented code (thanks Axel)
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-28 13:43:13 +00:00
Stefano Ceccherini
7f2831b56b
Removed a couple of friendships, commented/removed unused stuff
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-28 13:20:05 +00:00
Axel Dörfler
2724858b5b
Added global app_server port, so that other parts of the server don't have
...
to search for it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12859 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-27 13:36:05 +00:00
Axel Dörfler
a4ad43aa83
Fixed some more cases of "error != specific error ==> everything alright, then".
...
Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-27 13:34:52 +00:00
Stefano Ceccherini
5e9441bed9
Removed leftovers
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-27 10:57:25 +00:00
Axel Dörfler
d7c08b7d2e
Tried to make the ServerApp aware when a client dies: the main communication
...
port is now transferred to the client, so that it goes away automatically.
Unfortunately, this doesn't seem to work. This code is truly a big mess :-/
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-26 15:06:31 +00:00
Axel Dörfler
280d1aac5b
Tried something, didn't work, some cleanup left.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12845 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-26 15:04:45 +00:00
Axel Dörfler
0c7e8ef8f4
Renamed "cl" to fCurrentLayer.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-26 13:56:42 +00:00
Axel Dörfler
e5b4782b4e
Made some necessary enhancements to class Screen; the app_server also
...
has to care about refresh rates. Also changed Screen::GetMode() (formerly
Resolution()) to return all interesting values, so that hopefully no one
will call it anymore like RootLayer::SetScreens() did.
Greatly improved the horrible RootLayer::SetScreens().
The app_server is now able to deal with failing HWInterface::SetMode() calls;
in this case, it will fall back to the hardware's current mode. This now
also works correctly in combination with the vesa driver, so that you don't
have to compile the app_server with the same resolution you boot in anymore.
SetMode() now always returns if it succeeded or not.
Renamed RootLayer::fScreenXYResolution to fScreenWidth/Height respectively.
Removed the useless DisplayDriver::DisplayMode() method.
Added B_GET_DISPLAY_MODE to the required accelerant hooks.
Some minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-26 09:21:51 +00:00
Stephan Aßmus
d593ad8f06
added a little debugging facility for printing on-screen debugging info on Haiku. For those like me without serial debugging... also made RootLayer use the desktop background color.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-25 23:59:23 +00:00
Stephan Aßmus
74994d1307
added license headers
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-25 23:47:05 +00:00
Stephan Aßmus
55d6f1b792
Many efficiency improvements to text rendering. Moved stuff from Painter into AGGTextRenderer which didn't belong in Painter. AGGTextRenderer now has an embedded transformation, which expresses the font rotation and (in future) shear settings. Removed direct support for BBitmaps from Painter (supposed to draw ServerBitmaps). Tested drawing of bitmaps other than B_RGB32. (only B_CMAP8 and B_GRAY8 so far, but they work). Right now, these colorspaces are supported by on the fly conversion. So every colorspace supported by BBitmap::ImportBits() should work, which are a lot more than the R5 app_server can display.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12815 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-25 18:20:45 +00:00
Axel Dörfler
b368a1cb0b
Never (!) only ask for a specific error code, and assume everything went okay if it isn't reported.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12805 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-25 01:51:13 +00:00
Axel Dörfler
8adcce5097
If the accelerant of a graphics device could not be opened, initialized, or had
...
missing required hooks, it's now unloaded (and uninitialized if necessary)
correctly, the device is closed, and the next one will be examined.
Not deeply tested, but seems to work.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-25 01:35:38 +00:00
Axel Dörfler
afbbdf7ce5
Applied a patch from Stippi to temporarily fix a drawing problem the hard way.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12799 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-24 15:37:26 +00:00
Adi Oanca
89d4bfbf2a
Added initial support for BView::SetMouseEventMask(). Buttons appear to be working well.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12789 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-23 17:23:20 +00:00
Stephan Aßmus
ac167e6ead
Various fixes and efficiency improvements to the drawing backend. Among other stuff, stroked lines with a width greater than 1 have anti-aliased butts now. There are some bugs left regarding text rendering.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12761 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-22 12:12:56 +00:00
Stephan Aßmus
3295cceb8f
Forgot something
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12751 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-20 23:54:28 +00:00
Stephan Aßmus
7220b138f2
fixed confusion of byteCount and charCount in ServerFont::StringWidth(), just in case anyone really uses it later. Added UTF8CountChars() to moreUTF8.h, but then I didn't need it...
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-20 23:51:33 +00:00
Stephan Aßmus
3f513bbafe
Font rendering code should be cleaner, maybe a little more efficient and better documented. Rotated text is supported again.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12748 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-20 23:26:15 +00:00
Stephan Aßmus
e980fe005f
fixed the build, sorry
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12747 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-20 19:59:24 +00:00
Stephan Aßmus
1218d80ff8
removed no longer used stuff
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-20 19:54:12 +00:00
Stephan Aßmus
2762b0cecd
Work in progress... improvements on font stuff, reverted to using Painter to get the string width. Since it actually uses glyph caching, it is about 20 times faster than the implementation in ServerFont (and a about twice the time as R5). I added a StringWidth method to Painter and AGGTextRenderer which works as correct as ServerFont::StringWidth, which btw was broken, because I mixed up glyph count and byte count...
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12745 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-20 19:52:38 +00:00
Stephan Aßmus
38c5a7b7fa
Implemented StringWidth in ServerFont, updated ServerApp to use it, and removed a -1 from TextView in the char location calculation, which I didn't understand and without which the cursor location and related stuff now finally work.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12744 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-20 17:36:55 +00:00
Axel Dörfler
52005fdaff
Finally fixed Adi's repeatedly mentioned pet peeve: in AS_LAYER_GET_MOUSE_COORDS
...
communication, the port's reply port is no longer sent to the app_server (as it
knows where to reply to, anyway).
Also made sure the view's looper is locked while getting the coords - I guess
BPortLink doesn't like to be written to from two different threads :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12742 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-20 02:42:52 +00:00
Stephan Aßmus
9962b67e5f
DisplayDriver::DrawBitmap() takes no more region, the clipping is expected to be already set, as with all other drawing functions. Moved bitmap drawing message dispatching in the drawing messages area, where the correct clipping is set too. Moved cases for messages that don't need clipping applied, ie which don't draw anything, into the normal dispatch function. This means SetHighColor() and so on will no longer rebuild the clipping in Painter. Would be interesting to know how much performance this had cost...
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12741 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-20 00:09:59 +00:00
Stephan Aßmus
9f602781bf
Added a check for single buffered mode when reporting available HW acceleration, because it clearly won't work in double buffered mode.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12737 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-19 17:39:58 +00:00
Stephan Aßmus
3eaf632305
improve smoothnes of arcs rendering in Painter, fix a warning
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-18 12:16:15 +00:00
Stephan Aßmus
987f7a0a18
Updated Painter to produce the exact same results for stroked round rects and ellipses. R5 is kind of strange... I didn't reproduce some obvious R5 round rect defects though. Added a remark in ServerScreen about deleting the DisplayDriver, I left it commented, because the obos_registrar is not quitting when the app_server is closing, this should be fixed first.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12703 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-18 00:22:49 +00:00
Stephan Aßmus
ad6b480400
Work in Progress. The server keeps the client window up to date on layer movement/resizing. This fixes quite a few problems and brings support for FrameMoved and Resized hooks. But implementing it this way has its own set of problem, most importantly: When a BView calles Window()->CurrentMessage() in its FrameMoved/Resized hooks, it will see something very different from what it would see in R5. This needs to be fixed, but I have not had a good idea how to do this other than faking the current message in BWindow, which I didn't look into.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12689 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-16 15:39:58 +00:00
Stephan Aßmus
1f738c5b4e
Used other font metrics members in the GetEscapement implementation in order to support white spaces. As suggested by DarkWyrm. It seems to work better now, but I realised that DisplayDriverPainter::StringWidth() is broken in the same way. Will be fixed next.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-16 11:03:28 +00:00
Stephan Aßmus
92acca78db
Finally nailed a graphics bug I was looking for for quite some time. The only one I'm still seeing is with text. Sometimes the last line of text is not drawn.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12680 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-16 11:00:50 +00:00
Stephan Aßmus
85e7619148
added syncing to HW acceleration, so that nothing gets drawn by the CPU before the HW commands have been executed. Works here with Radeon. Removed a debugger call from app_server when the mouse position changed in UP/DOWN events compared to the last MOVED event. replaced it with an fprintf and updated the on-screen mouse position. IMHO, all debugger calls should be replaced with fprintf when compiling for Haiku.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12670 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-15 11:59:14 +00:00
Stephan Aßmus
151ebb14dd
just a little cleanup, made PNG screenshots work
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-15 00:22:55 +00:00
Stefano Ceccherini
d4045331c8
some minor cleanups
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-14 16:04:49 +00:00
Stefano Ceccherini
cb80e15b3c
ServerWindow is no more a ServerApp's friend. Some cleanups.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12663 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-14 13:22:26 +00:00
Stephan Aßmus
9bdb0522c1
Implemented BFont::GetEscapments() float version. It is pretty rough yet, but appears to handle UTF8 correctly. The optional escapement_delta is currently ignored. I didn't touch other functionality too much, until I know more about it.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-12 15:09:30 +00:00
Stephan Aßmus
b3d3da708d
more cleanup, fixed a bug in AS_GET_ESCAPEMENTS_AS_FLOATS that caused a lockup. DarkWyrm - I'm looking at you. :-)
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12640 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-12 10:31:48 +00:00
Stephan Aßmus
3c6c2f8adb
Found the problem in my hardware acceleration code (pretty lame bug...), now we have hardware accelerated single buffer mode (still with a software cursor) under Haiku, and it feels quite nice already. For me, this is the right direction to go. That being said, I still have no clue how the sync_token should work, so if someone can point me to some documentation about accelerants, particularly the cursor related stuff now, I'd be grateful!
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12623 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-10 12:52:13 +00:00
Stefano Ceccherini
821d08e5ea
Added a TODO item
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12596 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-08 06:24:35 +00:00
Stefano Ceccherini
f3a544e820
Putting this handler in once again, as it looks it's used in InterfaceDefs.cpp, even if it's not working
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12595 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-08 06:21:48 +00:00
Stefano Ceccherini
8058130392
Cleanup of the ServerApp parts I looked at. Removed reduntant comments
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12594 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-08 06:06:55 +00:00
Stefano Ceccherini
09cbe37854
Fixed leading. Simplified a bit the code
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-07 17:32:43 +00:00
DarkWyrm
fb52610b82
Added a handler for GET_ESCAPEMENTS_AS_FLOATS so that there are no deadlocks in the BFont call until the server-side code can be implemented
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12590 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-07 17:11:30 +00:00
Stefano Ceccherini
04efb239b7
AppServer is no longer a friend of ServerApp. Small cleanups.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12586 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-07 15:56:15 +00:00
DarkWyrm
3348baea8f
Fix for leading space
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-07 15:04:52 +00:00
Stefano Ceccherini
46a20a9b71
Font leading is not the total height of the font
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12584 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-07 13:58:31 +00:00
Stefano Ceccherini
8c7998ef76
Fixed endless loop when a BWindow is created with the B_ASYNCHRONOUS_CONTROLS flag
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-07 13:03:20 +00:00
Stefano Ceccherini
78f09a0553
app_server doesn't hang anymore when an application exits in an unclean way. Got rid of the kill_thread in ServerApp's destructor. Small refactoring. Added a TODO item.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12578 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-06 22:38:04 +00:00
Stefano Ceccherini
c63a94c7e3
Fixed a possible deadlock
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-06 07:47:17 +00:00
Stefano Ceccherini
cd5920926b
Fixed various bugs related to utf8 data in B_KEY_DOWN/UP dispatchers.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12575 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-06 07:22:01 +00:00
Stefano Ceccherini
61d296c9f5
Fixed a crashing bug
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-05 07:38:39 +00:00
Stephan Aßmus
fbf48e6437
Enabled HW acceleration for CopyRegion(). Tested on Haiku and it works. I also implemented FillRegion and InvertRegion. But using different acceleration hooks after one another freezes Haiku, app_server, the accelerant or whatever. I have no clue about accelerants, so if a knowledgable someone would have a look at AccelerantHWInterface.cpp, that'd be great. The software cursor stuff has a cosmetical bug with regards to CopyRegion() too, I don't understand it yet. I also tried to improve StringWidth() and DrawString() preformance. I confirmed that the glyph cache is actually used, but AGGTextRenderer::RenderString() is a dog.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12573 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-04 23:48:19 +00:00
DarkWyrm
5e6d7d522d
Fixed a TODO - added a method for calling StringWidth with a ServerFont instead of DrawData
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12568 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-04 09:39:06 +00:00
Stephan Aßmus
d3194176a3
added support for software cursor needed for single buffered mode
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-03 21:48:22 +00:00
Stephan Aßmus
9c796f60c2
rearranged some functions, removed unused ones
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-03 21:47:08 +00:00
Stephan Aßmus
b060f5e1eb
more correct implementation of B_OP_COPY, in that it blends against the current low color (as seen in text rendering on BeOS), of course this extends to anti-aliased lines on Haiku
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12559 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-03 21:45:16 +00:00
Stephan Aßmus
24bc7597eb
cosmetic
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-03 21:43:51 +00:00
Stephan Aßmus
265db80516
added a timeout for sending messages down to the client, it keeps app_server from hanging, though of course it doesn't fix the real problem, I have not had time to investigate the messaging, but this work around shows that the hang ups that I was seeing indeed happen in the messaging code
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-03 21:42:37 +00:00
Stephan Aßmus
48c0335055
added a small safety check
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12556 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-03 21:40:29 +00:00
Stephan Aßmus
924b7ab22c
the clipping BRegion is now always allocated, added shortcut for determining if there is a valid clipping
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-03 21:39:03 +00:00
Stefano Ceccherini
55814cfde4
Added a TODO item with a bad bug report
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-02 08:29:37 +00:00
Stefano Ceccherini
f812bf8b4c
Implemented server side support for BScreen::SetMode(). Note that setting the mode works, but rootlayer crashes afterwards. I guess I'll need to lock something. Adi ? Stephan ?
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12523 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-01 06:26:49 +00:00
Jérôme Duval
ecbc8ec9c2
reversed cursor.x and cursor.y
...
cursor semaphore initial count is now zero
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-30 15:00:10 +00:00
Stefano Ceccherini
6e927d6e3b
BScreens methods didn't work for a number of reasons: fixed.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12517 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-30 07:04:27 +00:00
Stefano Ceccherini
9c06e46d6a
fDriver wasn't apparently used anymore. Thanks Jerome. BTW we should remove it if it's useless
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-30 05:45:49 +00:00
Stefano Ceccherini
4dbe8b9db6
Server-side code for BScreen::GetMode() (actually tweaked an old implementation)
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-29 20:30:04 +00:00
Stephan Aßmus
1596a167c0
work around for layers not being moved that have not yet been added to the tree. See WinBorder::MoveTo for the explaination. The same problem should be at other places and most likely for normal views as well. This fixes BWindow::MoveXX() when it is not yet Show()n
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-28 23:56:40 +00:00
Adi Oanca
b9cc06b57c
Show workspace number in the upper left corner
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12497 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-28 18:28:23 +00:00
Stephan Aßmus
9715a3e1bf
fixed BWindow::MoveXX(), BWindow::ResizeXX() and BView::ConvertToScreen()
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-28 12:31:25 +00:00
Jérôme Duval
e9da11d0b2
added inputserver test mode for ViewHWInterface
...
we write view events to a port so that the ViewInputDevice gets them and have them processed by input_server, and then app_server
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-28 10:10:52 +00:00
Stephan Aßmus
609b465638
fixed BView::MoveTo() and BView::ResizeTo(), fixed typo
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-28 09:44:29 +00:00
Stephan Aßmus
4828a7251f
I'm not 100% sure, but I think I fixed a confusion in sending the current view position and size to the client. Note that BView::originX and BView::originY are poorly named, because they are not the local coordinate system origin, but the offset within the parent at which the view is located.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12484 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-27 23:20:29 +00:00
Stephan Aßmus
50581a7c0a
fixed a bug with drawing ellipses and invalidating the correct area for stroking paths, taking the stroke width into account
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-27 23:17:39 +00:00
Stephan Aßmus
db7226db9d
work in progress to get scrolling working, so Adi can have a look, no changes to existing functionality, cleanup in Layer.cpp
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-27 17:26:57 +00:00
Stephan Aßmus
93a2cfd43c
Correct implementation of BView::CopyBits() in ServerWindow, implementation of CopyRegion in DisplayDriverPainter that sorts the rects topologically depending on direction and does the copy in place, obtaining a speedup of about 250%. TODO: extract the sorting algorithm so that it can be reused for the hardware accelerated version later.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-26 13:50:34 +00:00
Axel Dörfler
7b58474a09
Beautified some odd code (like "a ? a : NULL" to "a").
...
Applied our coding style guide.
No functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-25 14:14:09 +00:00
Adi Oanca
51a73c1e2b
Fixed a bug where a modal app window appeared in current workspace although its workspace mask did not include it
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12462 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-23 10:05:33 +00:00
Adi Oanca
d53639ce2e
Implemented support for BWindow::SetFeel()
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12456 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-21 18:57:34 +00:00
Stephan Aßmus
3934e7037e
forgot another important detail...
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12451 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-20 10:36:05 +00:00
Stephan Aßmus
f8bbbd8332
it helps reading my own commit messages
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-20 10:12:54 +00:00
Stephan Aßmus
ded5874ea2
Implemented changes necessary for single buffered mode, it is turned off for now, because the soft cursor is currently not being taken care of. We will still use double buffering if the screen color space is not 32 bits, too.
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12449 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-20 09:27:15 +00:00
Jérôme Duval
b8d27287f9
Added support for cursor position handling from input_server
...
LaunchInputServer now waits for _roster_thread_ to be running
Not tested/not enabled :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12445 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-19 20:44:09 +00:00
Stephan Aßmus
0999749164
experimented with BView::CopyBits(), found out how it should work, but didn't do the changes yet for a correct implementation
...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12444 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-19 18:55:46 +00:00