Commit Graph

1256 Commits

Author SHA1 Message Date
Axel Dörfler
b66d753712 * Prepared the BScreen and BPrivateScreen class to be used with multiple monitors.
* BPrivateScreen now buffers its frame for 0.1 seconds (so that calling it several
  times in a row is both consistent and cheap).
* Added GetFrameBufferConfig() call to the HW interface (and implemented it).
* Added server commands AS_VALID_SCREEN_ID, AS_GET_NEXT_SCREEN_ID, and
  AS_GET_FRAME_BUFFER_CONFIG.
* BPrivateScreen::BaseAddress() and BPrivateScreen::BytesPerRow() are now working.
* minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14915 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 14:36:12 +00:00
Axel Dörfler
d9525baaf5 * Forgot to update Screen.h with the last commit...
* Introduced and implemented AS_GET_SCREEN_ID_FROM_WINDOW - it only returns B_MAIN_SCREEN_ID,
  though.
* renamed ServerWindow::fHandlerToken to fClientToken.
* The BScreen(BWindow *) constructor now really asks the server for the screen ID.
* ServerApp::fWindowList is now a BObjectList.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 12:08:21 +00:00
Axel Dörfler
a817d6ad5a * (tried to) implemented RootLayer::ResizeBy() and activated AS_SET_SCREEN_MODE again;
it works in the test environment, but I haven't yet tested it on real hardware.
* moved PrivateScreen.h to src/kits/interface/ - it's not used outside of that one.
* moved reading the color map from the BPrivateScreen constructor to the ColorMap()
  method.
* improved/cleaned server/client communication for the screen stuff a tiny bit.
* fixed the GetBitmap() method I implemented yesterday.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 11:01:02 +00:00
Stefano Ceccherini
d2718b5d34 we write family and style as an uint32, so we should read it as an uint32 too
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 21:54:41 +00:00
Axel Dörfler
8bd2c11fc4 Moved the declaration of roundf() to HaikuBuildCompatibility.h - it's missing from
math.h but exported by libroot.so.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 19:43:42 +00:00
Axel Dörfler
8b794301de Changed the way the app_server is built:
* no more libappserver.so - this breaks the "Appearance" application, but that
  has to be fixed some day later.
* the drawing stuff is now built in its own directory as libasdrawing.a.
* TEST_MODE defaults to "0" if not defined yet - it's overridden in the test
  build now, not in the main build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 15:40:21 +00:00
Axel Dörfler
96709e443e One more now superfluous roundf() removed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14895 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 14:09:55 +00:00
Michael Lotz
cf10934e5f Introducing Message4. The changes to the related sources are ifdefed with USING_MESSAGE4 which is defined in Message4.h. To use Message4 the Message4.cpp, Message4.h, MessageUtils4.cpp, MessageUtils4.h and MessagePrivate4.h have to be linked to their counterparts without 4 suffix. Then MessageBody.cpp and MessageField.cpp have to be commented out in the app kit Jamfile and r5_message.cpp has to be added. There remain some bugs to be found. Feel free to change that.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 11:31:07 +00:00
Stephan Aßmus
4cfc480f5d no longer valid with new way of setting user clipping
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-13 00:24:37 +00:00
Ingo Weinhold
758b1d0e05 Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
  declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
  explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
  something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
  'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
  is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
  Otherwise the an inner class with that name is considered as friend.
  gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 23:27:14 +00:00
Ingo Weinhold
56436a1ab8 GCC 4 fix. Might have changed the semantics, but I refuse to hurt
my brain by trying to understand code using gotos. People, learn
structured programming!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 17:49:05 +00:00
Stefano Ceccherini
25922abe74 reduced the directwindow semaphore timeout to half a second. Now we checks for < B_OK in the semaphore acquisition, to handle every error condition
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 11:00:57 +00:00
Axel Dörfler
2b7b3ade5c Added more or less empty "begin/end transaction" handling in ServerWindow.
Right now, only the updates are disabled as a start. I am not sure what else
we can do here, but there probably is something :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 14:25:12 +00:00
Axel Dörfler
dfd5b49996 * last change set window title to "Unnamed Window" if the title was empty - but
that's probably not wanted, as a window without a title is perfectly okay.
* AS_CREATE_WINDOW will now return a proper error code on failure.
* The title read from the link is no longer adopted by the ServerWindow constructor,
  but copied - while the previous version was a bit faster, this is a lot cleaner.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 13:06:22 +00:00
Axel Dörfler
13e525e302 WinBorder::SetName() now also triggers rebuilding the decorator region - IOW BWindow::SetTitle()
should now work as expected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 11:03:33 +00:00
Stefano Ceccherini
df555388b9 Don't look for bugs in other people's code. The bug is in your code. IOW BDirectWindow apps now work fine :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 00:45:45 +00:00
Stephan Aßmus
c5522d81d8 * added SetUserClipping() and DrawingRegion(), which is used for
handling client defined clipping. The client clipping stays in local coords,
  which greatly simplyfies things. We ought to find a way to reduce the number
  of regions needed per Layer. I just added another one...
* renamed a few "lay"s to "child".
* used the new client added clipping in ServerWindow


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14847 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 00:19:32 +00:00
Stephan Aßmus
41f78f7884 the current clipping is the combined user defined clipping from all previous states
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 00:14:58 +00:00
Stefano Ceccherini
b2cc1487d1 Send notifications for directwindow when a window is moved
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14843 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-11 00:10:03 +00:00
Axel Dörfler
8f5f0ec4b1 * fixed case for WinBorder::MouseDown() if there is no layer below the mouse - might
not even be a valid condition, but seems to happen.
* style cleanup...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14841 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 22:30:43 +00:00
Adi Oanca
e2ad4ab9b2 Not in mood for too much coding, I had a look through the code tonight. And guess what? Like Stefano
the other day, I discovered, not a bug, but how to invalidate only the area that requires it when
changing window order (selecting or moving to back a window). Stuppid me, that stuff didn't worked
because I forgot how windows were arranged in the list returned by Workspace::GetWMState(). I was
iterating the wrong way! :-)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14839 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 21:52:59 +00:00
Axel Dörfler
0964291534 Added message filter to the CardView; it now intercepts all messages, so that "Command-Q"
will no longer quit the haiku_app_server, but the application running in the server.
"Print Key" now also works as expected.
Only switching workspaces continues to use "Control-Fx" in the test environment. Under
Haiku, it now uses "Command-Fx" as on BeOS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14834 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 18:37:55 +00:00
Axel Dörfler
c12196d47b * Removing fonts now works as expected.
* removing a font family or style now always goes through the font manager.
* removed FreeType "cache" remains (it wasn't used, anyway, and won't be used
  by us).
* renamed SharedObject to ReferenceCounting as that's what it does.
* the default fonts weren't deleted on shutdown.
* added temporary work-around for waiting until a newly created entry is complete
  (just waits a moment...) - this will be fixed once Haiku supports this in a
  better way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14833 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 17:32:35 +00:00
Axel Dörfler
831a01f893 FontStyles are now also orded, but not alphabetically: their faces determine
the order, regular fonts come first, then bold, and then italics.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 15:48:37 +00:00
Axel Dörfler
36a37b76d6 The font family list is now sorted - besides the obvious advantage for the user,
this also allows binary searching the families (which is now done, too).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14826 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 15:33:18 +00:00
Axel Dörfler
2522a90fd1 Even more font stuff:
* the node monitor is now working - fonts can only be added yet, though
* deleting a FontFamily did not work before, as the last style to be
  removed tried to delete the family again.
* "luckily", FontFamilies and FontStyles were not deleted at all before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 14:52:26 +00:00
Axel Dörfler
174b20a89a Adds the concept of owning the table entries - before, they were always owned,
now it defaults to not-owning.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14823 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 14:49:24 +00:00
Stephan Aßmus
5211328a37 turn off on-screen debugging for now, the errors it reported are not that critical, and printing the debug info itself could lead to problems
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 13:38:22 +00:00
Stephan Aßmus
0d660a960b handle errors when reading from the link, at least for the bigger items, it should be enough to just check the error in the last call to Read(), since previous errors are kept in the Link
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-10 13:37:08 +00:00
Axel Dörfler
7c3d8ad0c7 * added a call to png_set_strip_alpha() which could fix the alpha channel
problem we're seeing (at least I couldn't reproduce the problem anymore).
* SaveToPNG() now returns an error code.
* cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 23:52:27 +00:00
Adi Oanca
76d68e8ad8 More cleanup.
* moved code from Layer::do_MoveBy/do_ResizeBy/do_ScrollBy into
Layer::MoveBy/ResizeBy/ScrollBy()
* removed do_Move/Resize/ScrollBy()
* removed WinBorder::_ResizeBy()




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 20:14:52 +00:00
Axel Dörfler
90dfa70739 * ServerFont now also adopts the FontStyle's face and direction on
construction.
* ServerFont::SetStyle() now adopts the style's face and direction, too.
* Started a more sane handling of ServerFont::SetFace() (at least there's
  a to-do comment :-)).
* Minor cleanup (GetStyle() -> Style(), GetFamily() -> Family(),
  GetPath() -> Path()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 20:10:40 +00:00
Axel Dörfler
2fe84ae95f Now AS_GET_DEFAULT_SYSTEM_FONT actually returns the default font as used
by the app_server (ie. also if it's a fallback font).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14805 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 19:22:21 +00:00
Axel Dörfler
974dd00c85 The font manager now has default fonts for bold/fixed as well - these are now used
in the DesktopSettings as defaults, too (but can be changed there).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 19:16:25 +00:00
Axel Dörfler
16f782ccbd Implemented AS_SET_SYSTEM_FONT.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14803 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 19:14:13 +00:00
Axel Dörfler
d0a688ee92 Introduced and implemented new font command AS_GET_DEFAULT_SYSTEM_FONT that returns
the default fonts of the app_server.
Moved some font command implementations around to group them a bit better.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 18:34:48 +00:00
Stephan Aßmus
2b97fe884d now updates BView::PenLocation() correctly after DrawString(), stuff like DrawChar('a') is working nicely now, for rotated text much better then in BeOS in fact because of subpixel precision in pen location
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14794 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 16:55:08 +00:00
Stephan Aßmus
f8e33ed5bd fixed current pen position, thanks to Stefano for spotting this one, I looked very hard in the same place, but didn't see it :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 13:28:15 +00:00
Stefano Ceccherini
ba48e86927 Removed leftover
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 23:55:27 +00:00
Stefano Ceccherini
e16b3f2972 friend is bad. Protected, even.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 23:48:13 +00:00
Axel Dörfler
e3343885bb Even if Adi really don't like it, it's perfectly okay to resize or move a layer before
adding it to its parent.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 23:48:06 +00:00
Stefano Ceccherini
8fbbd37f83 Added some code for notifying client BDirectWindows that the window was moved or resized. Currently commented because of other problems. Looks like the windows bounds are not changed if a MoveBy() is called before the window is shown. Removed unneeded includes. Small changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14783 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 23:26:47 +00:00
Stefano Ceccherini
602d0ba42c Remove IPoint.cpp from the build as no one needs it
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 23:25:31 +00:00
Axel Dörfler
d08f8a6e68 Upon construction, the font is not locked by the drawing engine, so we better lock it ourselves.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14781 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 19:29:05 +00:00
Axel Dörfler
5e4d267b5e The FontStyles are already deleted when deconstructing the family list - the
styles hash table shouldn't try to delete them again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 19:04:01 +00:00
Adi Oanca
02414ebd4e Cleanup.
* removed old Convert{To|From}{Parent|Top} methods. They were replaced by
Convert{To|From}{Parent|Screen}(type *data)
* removed some unused methods from Layer class.
* re-aranged Layer's class declaration - grouped methods
* made all Layer's members private.
* renamed a few private methods from method_name _MethodName




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 17:38:07 +00:00
Axel Dörfler
ec9b3f7ca1 The font manager now utilizes a hash table to look up fonts by ID.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14777 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 16:49:33 +00:00
Stefano Ceccherini
0266d3fd18 Made ServerWindow::_HandleDirectConnection() a public method. It will be called from WinBorder too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14773 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 08:32:32 +00:00
Axel Dörfler
3a222bcbec Adi's changes broke layer resizing before they are attached to the layer hierarchy.
Also fixed a drop into the debugger when starting Tracker: fRootLayer is now NULL
in the constructor of WinBorder - which is not fatal, as we only wanted to get
the screen size (which was formerly managed by RootLayer).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 01:39:59 +00:00
Stephan Aßmus
971ed3de1e * origin in DrawState is now the summed up origin, when setting it,
use the origin from the previous state as a start
* this fixes scrolling again (minus redrawing too much stuff,
  this is left for Adi :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14770 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-08 01:16:15 +00:00
Adi Oanca
d4e4f29a42 Cleanup after the old clipping code. Removed a few methods as others took their place. More cleanup to follow on tomorrow. :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14764 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 21:24:53 +00:00
Adi Oanca
2c8cfe2dfc Bye-bye old clipping codesvn update Some cleanup to follow.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14760 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 19:01:12 +00:00
Adi Oanca
d7467f6923 Fixed resize limits problem
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14758 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 18:09:49 +00:00
Axel Dörfler
474f33d137 Added missing header, applied style guide.
This file should probably still removed one day, or at least most of its functions
should either go away or somewhere else.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14754 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 17:16:09 +00:00
Axel Dörfler
91c82a4957 Added missing newline.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14753 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 17:00:36 +00:00
Axel Dörfler
e37155c670 * The font list is now cached client-side. The app_server is only queried for
updates.
* Optimized retrieving the font list from the server.
* This greatly simplifies the app_server communication for getting the font
  list as well - there are now only 2 commands instead of 6.
* Moved extra font flags creation from ServerApp to FontStyle::Flags().


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



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14749 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 16:07:25 +00:00
Axel Dörfler
b2cc345461 More font work:
* Simplified server communication a bit: instead of separate queries for font
  direction, "is fixed", ... there is now a private extra flags field that is
  filled on demand.
* The server command names now describe what the command does, and are not simply
  named after the BFont method (AS_SET_FAMILY_AND_STYLE vs. AS_GET_FAMILY_AND_STYLE_IDS).
* Replaced B_SET_SYSFONT_{PLAIN|BOLD|FIXED} with a single B_GET_SYSTEM_FONTS.
* Rewrote Font.h and added our license.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14741 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 11:02:39 +00:00
Stephan Aßmus
0118ad76e1 * Painter uses the line_cap and join_mode settings of DrawState
* Painter implements DrawShape for stroking and filling BShape data
* Painter uses clipping to avoid problems with huge coordinates, the R5 app_server can be crashed by this.
  -> this should be added to more places as well like text rendering
* DrawingEngine uses the Painter to draw BShape data


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14735 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:23:40 +00:00
Stephan Aßmus
b574c74121 opList is uint32
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14733 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:17:40 +00:00
Stephan Aßmus
7dd038f405 calling _ResizeBy with zero offset doesn't do anything
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14731 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:16:12 +00:00
Stephan Aßmus
19ae7ecce0 sorry, forgotten in previous commit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14730 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:14:47 +00:00
Stephan Aßmus
a38aedd980 no longer needed, moved to painter test folder
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14729 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:13:12 +00:00
Stephan Aßmus
f9129d56a7 updated license header
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14728 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:11:58 +00:00
Stephan Aßmus
c00fc4e31a default to B_MITER_JOIN too
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14727 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:11:02 +00:00
Axel Dörfler
86ad4b9c5e First steps into on-demand font scanning. When you've installed lots of fonts, this
will speed up launching the app_server considerably (once it's done).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-06 18:58:09 +00:00
Adi Oanca
ac4f06c5c6 Fixed invalidation with new clipping code. Only what's needed is
redrawn/invalidated now, with a single exception which I am working
on(when changing the front window the whole window area is invalidated
not just the region that became visible). The old Clipping code is broken
now. I will remove it in the next days.

Actual changes:
* removed Layer::GetWantedRegion() - was badly implemented.
* made Layer::_GetWantedRegion public and renamed it to: you guessed! :-)

* introduced Layer::MarkForRebuild(), TriggerRebuild(). You want to
calculate the new clipping regions, mark an area and then call
TRiggerRebuild() which will rebuild the visible regions for the current
Layer and all its descendants.

* for a Layer to redraw some parts of it, use
RootLayer::MarkForRedraw() to mark a region and then
RootLayer::TriggerRedraw() to see the changes (or send _UPDATE_ message in
case of a WinBorder).






git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14719 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-06 17:47:06 +00:00
Marcus Overhagen
4b1aabf67e I don't know why, but when starting Tracker there is no root layer here
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-05 21:24:51 +00:00
Jérôme Duval
428ebf6d5f myRootLayer can be NULL for offscreen bitmaps, fixes crash on Media preferences
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14711 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 22:48:51 +00:00
Stephan Aßmus
b2f2cb6203 simplified coordinate conversion from/to screen by removing duplicated code, Adi was there a reason to check for RootLayer before conversion or was this left-over?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14709 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 19:51:38 +00:00
Stephan Aßmus
d79939116c fixed build for old clipping
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14708 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 19:50:34 +00:00
Stephan Aßmus
e7869c4c74 renamed DisplayDriverPainter to DrawingEngine, removed tons of duplicated code, and - guess what - found some bugs while doing so... but nothing critical. This patch removes the former DisplayDriver API from libappserver.so, which I think breaks Decorator plug-ins for now
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 18:22:22 +00:00
Marcus Overhagen
f38c001e56 Assigned names to "some BLocker"s to aid debugging.
Small cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14703 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 16:56:15 +00:00
Stephan Aßmus
6ed894182f renamed DisplayDriverPainter.* to DrawingEngine.*
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14695 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 15:54:16 +00:00
Stephan Aßmus
58468dfed0 first step of geting rid of abstract DisplayDriver base class for less development overhead, DisplayDriverPainter is renamed to DrawingEngine
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14694 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 15:23:54 +00:00
Stephan Aßmus
13cff625f0 cleanup and removable of large portions of code duplication, fCurrentLayer and fCurrentLayer->CurrentState() are checked in _DispatchMessage already, so _DispatchGraphicsMessage() assumes they are valid
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14691 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 13:45:16 +00:00
Stephan Aßmus
55e764c7f6 update license
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 13:41:44 +00:00
Stephan Aßmus
e422da6973 fix build for old clipping
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 13:39:12 +00:00
Axel Dörfler
962b688433 Forgot to update Layer::Scale(), too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14687 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 13:27:41 +00:00
Axel Dörfler
cb24f13bb0 The current graphics state of a Layer can now be retrieved by the new CurrentState() method.
ServerWindow is now using that method instead of directly accessing a Layer member.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14684 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 12:15:36 +00:00
Axel Dörfler
2c2fd7b237 Fixed scale calculation. The scaling is still ignored for the drawing coordinations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 12:01:44 +00:00
Axel Dörfler
1be1c7ccdf Fixed (again) the crash that happened when you quit the app_server in the test environment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 11:57:43 +00:00
Axel Dörfler
aca4f50d1e Merged DrawData and LayerData to one class DrawState.
Removed that ambiguous second copy constructor and moved push state functionality
into a separate PushState() method. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 11:37:28 +00:00
Axel Dörfler
5abd5613d6 LayerData::prevState is now called fPreviousState and is now private. Added new method
PopState() to make this possible.
When a new layer is created, the font state of the desktop will now be set: this fixes
a bug I introduced when separating the font manager's default font and the desktop's
default font.
The scaling stuff looks pretty broken to me.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14675 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 09:52:56 +00:00
Axel Dörfler
7490bd32f1 Now also uses the fallback family when the usual default font couldn't be found.
This hides a problem with the view states that the next commit will fix :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14674 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 09:49:25 +00:00
Axel Dörfler
05bd1efe5b * the FontManager is now a looper (but doesn't do anything useful yet).
* moved the system default font functionality into the DesktopSettings class.
* ServerFont::SetStyle() is now a public method.
* Improved font fallback routines: they will never end up without a font if
  there is at least one font installed.
* fixed some minor bugs in the DecorManager.
* Decorator now get a DesktopSettings object passed - dunno if that's a good
  idea (since we'll have to open the DesktopSettings header), but it works
  for now (and something like this is probably needed anyway).
* a clean ServerFont is now set to the system default font - and not to the
  (user chosen) desktop default font anymore (since the font manager doesn't
  know about that one).
* Improved font directory scanning in the font manager a bit, it's now using
  find_directory() instead of hard-coded paths.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14666 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-03 17:03:36 +00:00
Axel Dörfler
8365d9ecd2 * A ServerFont is now always valid, bye-bye ServerFont::InitCheck().
* The FontFamily is no longer reference counting itself.
* SharedObject is now more useful and destructs itself when unused.
* Fixed FontStyle::GetHeight()/ServerFont::GetHeight() semantics.
* Simplified ServerFont constructors.
* Removed wrong function descriptions.
* FontStyleHeight is no longer used: the FontStyle is calculating the
  base font height on construction - this reduces the resolution a bit,
  but it's hopefully not causing any troubles (doesn't look like it,
  at least).
* A FontStyle now removes itself from its family on destruction.
* More cleanup, removed unused stuff like FontStyleHeight.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14657 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-03 13:10:28 +00:00
Axel Dörfler
c9ff9a39d0 ServerFont::StringWidth() did not set the size of the face, and could therefore
return wrong results. Activated it again to work-around the possible font deadlock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14654 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-03 00:04:18 +00:00
Axel Dörfler
f1d3628119 Apparently, ServerFont::StringWidth() doesn't work for fixed width fonts...
Will look into this later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14648 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 14:55:51 +00:00
Axel Dörfler
cf550035dd This works around a deadlock that frequently happened when working with menus (font stuff).
I should start investigate this one more deeply some time...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 14:37:17 +00:00
Axel Dörfler
bdd34c028f Renamed the FontServer class to FontManager.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 13:25:39 +00:00
Stephan Aßmus
382049ca6f fix build of server for test environment
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14640 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 13:15:36 +00:00
Stephan Aßmus
26a2be8ba5 less overhead when byte count of string is already known
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14639 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 13:14:03 +00:00
Axel Dörfler
1156138b2f Removed unused files like PortMessage.cpp/h and Session.cpp/h.
Renamed LinkMsgReceiver.h and LinkMsgSender.h to LinkReceiver.h and LinkSender.h like
the classes they contain.
Split up PortLink.cpp/h into ServerLink.cpp/h and PortLink.cpp/h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14635 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 12:55:20 +00:00
Axel Dörfler
52d97df59c The FontStyle now gives its locker a name.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14632 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 10:51:46 +00:00
Axel Dörfler
5d1bd031a2 Fixed some communication mismatches I introduced earlier: we are no longer sending
whole font_family/style strings (each 64 bytes), but only strings, because they
are usually shorter than 64 bytes.
This should fix the StyleEdit problems Stefano were seeing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 09:50:51 +00:00
Axel Dörfler
3eba9bd8b3 Renamed the global "ftlib" to gFreeTypeLibrary.
Removed the FTC_Manager for now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 08:55:51 +00:00
Axel Dörfler
fb2d4d51a7 Removed unused variable (copy&paste remains...).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14626 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-02 08:54:56 +00:00
Axel Dörfler
6f121769ad * Added and implemented AS_GET_FONT_FILE_FORMAT - currently, it returns always
B_TRUETYPE_WINDOWS, though.
* possibly returned an uninitialized error code in some BFont methods.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14622 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 18:21:04 +00:00
Stefano Ceccherini
f3aa24ede7 Corrected the clipping region for BDirectWindow. The stripped down Stars demo now works.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 18:13:10 +00:00
Axel Dörfler
b4f34cfb95 * style and family IDs are no longer just the index in their parent's lists (as
they can disappear and IDs should stay persistent at least as long as the
  system runs).
* destroying a FontStyle discards its FT_Face again.
* the font style and family names are now truncated to the appropriate length,
  so that they can always be used via the Be API.
* (char *) == (char *) hardly compares the string (but was probably introduced
  by me when I stopped FontFamily from accessing FontStyle privates
* removed FontServer::SaveList() - made no particular sense to me.
* removed superfluous "inline" keyword in the FontStyle definition.
* more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 17:49:01 +00:00
Axel Dörfler
b8cde4497e More font work:
* simplified BFont::SetFamily*() server communication - there is now only
  AS_SET_FAMILY_AND_STYLE left, but at least that one works correctly.
* BFont::fFace is now always updated correctly.
* Moved the fFace masking to the server - BFont doesn't know enough to do
  this correctly, anyway.
* Only one version of get_font_style() worked correctly.
* Font family/style ID and index were used completely mixed up - this
  would have become an issue as soon as the font list changes during
  runtime.
* Enabled AS_GET_FONT_DIRECTION again - missing functionality should only
  be taken into account on lowest level as long as it can be emulated.
* Made FontServer a bit clearer to use (more to come).
* fixed several allocation leaks in the font server communication.
* New FontStyle::Direction() method, that currently only returns
  B_FONT_LEFT_TO_RIGHT, though.
* more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14618 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 16:28:01 +00:00
Stefano Ceccherini
0c378a5714 Thanks to latest changes, BDirectWindow now draws something. Though, looks like either the clipping region is wrong, or the app_server overwrites what the BDirectWindow app writes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 09:53:47 +00:00
Marcus Overhagen
1334ab4721 just some work, made sure to preserve app_server coding style
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14608 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 01:57:52 +00:00
Marcus Overhagen
d317ba7488 real men don't do any error checking
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14607 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 01:41:40 +00:00
Marcus Overhagen
094efed434 restored 14604
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 01:32:49 +00:00
Marcus Overhagen
051d07f0fc no longer free() a title pointer that wasn't malloced, but instead came from the outside (right from the middle of some port link stuff)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14605 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 01:11:26 +00:00
Axel Dörfler
9b1ad6f45e Fixed a bunch of bugs in the font sub-system:
* BFont::Face() was almost always wrong - also on the server side,
  _TranslateStyleToFace() was broken.
* a clean font was not correctly initialized to be_plain_font
* BFont::GetFamilyAndStyle() did not work correctly if either family
  or style was NULL - which is allowed, and shouldn't have let it abort
  its task.
* FontServer::GetStyle() by ID did not work reliably under certain
  circumstances (but those were not reached with the current server)
* BFont::SetFamilyAndStyle() did not work when family was NULL, and
  it also never set fFace correctly.
* Introduced a FontFamily::GetStyleWithFace()
* Renamed some FontFamily/FontStyle methods from ie. GetID() to ID()
  to match the style used everywhere else in BeOS.
* Removed AS_SET_FAMILY_NAME as its no longer in use.
* Lots of cleanup and simplification.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-31 23:21:36 +00:00
Axel Dörfler
36deda69ba Got rid of sDesktop.
Moved AS_ACTIVATE_APP over to Desktop. _CursorThread() is currently dysfunctional (but not enabled anyway).
Minor cleanup (Desktop::WindowList() is now a BObjectList).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-31 19:35:46 +00:00
Axel Dörfler
959a5a68bc Removed global gDesktop variable - there is now an sDesktop variable in AppServer.cpp, but
that will go away, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14590 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-31 11:05:52 +00:00
Adi Oanca
ce2fbc6151 Fixed a mistake I did a couple hours ago. Thanks Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14584 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-30 22:30:29 +00:00
Adi Oanca
fc0c33529d Added support for BRoster::ActivateApp(). Code not tested yet, but it should work.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14579 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-30 20:05:18 +00:00
Adi Oanca
ac89958f6e Removed RootLayer::EnqueueMessage(). Added support for BWindow's EnableUpdates(), DisableUpdates(), NeedsUpdate() and SendBehind(). The last one does not work as expected, for the moment it sends the window to back, just as Activate(false) does.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-30 11:33:31 +00:00
Ingo Weinhold
338b8dc301 Merged changes from branch build_system_redesign at revision 14573.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 16:27:43 +00:00
Adi Oanca
31ec092be1 Introduced Layer::Activated() hook function. Moved some functionality from RootLayer to WinBorder
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 11:15:47 +00:00
Adi Oanca
a577cf141f Immediately close app_server window after pressing close button in R5
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14564 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 10:35:09 +00:00
Adi Oanca
9f0d28e921 Fixed a stupid bug when checking if the window order changed. Added support for BWindow::Activate(false). Added some debug support for Workspace::WMState. Simplified a bit code for sending a window to back.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 10:19:23 +00:00
Adi Oanca
fc9c02aa4f Made the new clipping code to use a single message to update client frame/bounds. ACTIVATED new clipping code! If someone notices problems please write to any list
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-28 17:04:31 +00:00
Axel Dörfler
5030d60fe8 Connected the painter stuff to the temporary font lock work-around.
This seem to enhance the stability of the app_server by a magnitude (at least I can
now run apps like Installer and Media without an instant crash).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-28 09:52:26 +00:00
Axel Dörfler
c2a52d2836 Added a temporary work-around to lift the FreeType problem we're seeing a bit:
Turns out we are using a single FT_Face object for a given font size throughout the
app_server - but the FT_Face object is not designed for a multi-threaded access, AFAICT.
For example, it only has a single glyph slot, that we were using from different threads.
This fix does not cover the renderer, however, which also uses that shared object; IOW
even though it will crash less often it will still crash because of this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14543 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-27 16:33:35 +00:00
Adi Oanca
28d42d6e75 RootLayer thread receives BMessages only. Changed ViewHWInterface to send BMessages for input events
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-25 18:42:10 +00:00
Adi Oanca
557411309f preparing RootLayer thread to receive BMessages instead of PortLink ones
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14495 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 17:46:37 +00:00
Adi Oanca
3b19c4531d Introduced Layer::KeyDown/KeyUp/UnmappedKeyDown/UnmappedKeyUp/ModifiersChanged hooks. Simplified a bit RootLayer::KeyboardEventHandler().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 17:03:46 +00:00
Adi Oanca
9e5c574703 Layer::SendUpdateMsg() will tell us if sending _UPDATE_ message succeded. We'll use that information to clear WinBorder::fCumulativeRegion(server per-window dirty region) only on success.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 16:39:53 +00:00
Adi Oanca
66156adf92 In case SendMessageToClient() fails, it's good to know why
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 16:21:49 +00:00
Adi Oanca
182db85c0c Introduced Layer::MouseWheelChanged(). Cleaned up RootLayer::MouseEventHandler::case B_MOUSE_WHEEL_CHANGED.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 16:11:50 +00:00
Adi Oanca
da4a68b7f5 RootLayer thread only handles input messages now. All other actions (move/resize/scroll/invalidate/etc) are performed by locking the RootLayer object and taking the respective action from the calling thread(usulay a ServerWindow one).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 16:02:23 +00:00
Adi Oanca
eead807371 removed Layer::fClassID
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 14:44:26 +00:00
Stephan Aßmus
dd79576b10 * fixed scrolling for the current clipping code, it brings
up a new problem, maybe Adi has an idea for the fix, see
  comment in the code


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14451 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-20 13:06:38 +00:00
Stephan Aßmus
a405a49e82 * cleaned up and applied coding style to FontStyle
* got rid of bogus member variables in FontStyle (which were
  already flags in the underlying FT_Face structure)
* disabled using the FreeType font cache -> I think from
  my earlier tests, I can conclude that the cache was not
  actually working. At least not giving any speed improvements.
  The AGG engine contains a caching system, for now, it works ok.
  I have no idea if this has anything to do with crashes in the
  freetype code, but at least I have not seen any since this
  change. But I have not tested much...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14448 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-20 10:01:49 +00:00
Stephan Aßmus
2b8347c0d8 don't use potentially stall freetype font face handles. The code is
more correct now, but it doesn't actually fix anything, since FT_Face
handles are nowhere freed in the app_server code.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-20 09:51:56 +00:00
Stephan Aßmus
00e0821ffd Use a ServerFont instance which is assigned to the currently
used font, so that the FontStyle reference count reflects the
fact that the AGG engine might still use the font
-> I think this "fix" is valid, but I have still seen crashes
in the freetype code.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-20 09:44:46 +00:00
Stephan Aßmus
ccdfe4055f Jerome is encoded in UTF8
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14445 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-20 09:39:12 +00:00
Stefano Ceccherini
cf5a014940 Merged two case blocks, thus removing some duplicated code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14374 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-13 20:44:54 +00:00
Stefano Ceccherini
77e79df0f7 Added a comment
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14363 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-12 14:41:02 +00:00
Stefano Ceccherini
dea7a63c17 Some changes in _HandleDirectConnection(). Not tested. Could even fix the relative crashing bug.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14358 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-11 22:32:27 +00:00
Stefano Ceccherini
1fbd158e8b _HandleDirectConnection() now fills the direct_buffer_info structure. Clipping info is probably wrong. dw_info works, direct_window_test crashes for some reason
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-11 21:37:47 +00:00
Adi Oanca
33691ce0ac Removed NEW_INPUT_HANDLING define and the old code
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-11 18:11:25 +00:00
Stefano Ceccherini
ef06444893 Implemented basic server side support for BDirectWindow. It doesn't fill the direct_buffer_info struct correctly, it just sends B_DIRECT_START/STOP messages on show/hide for now. Tested with dw_info
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14347 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-11 05:25:52 +00:00
Stefano Ceccherini
85a1a67495 Workspace has a display_mode member where it stores the settings. Removed unused [Set]LocalSpace() methods, added Set/GetDisplayMode() methods
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14336 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-08 16:44:28 +00:00
Adi Oanca
b961b59696 - replaced Layer::get_user_regions with _GetWantedRegion()
- replaced Layer::alter_visible_for_children with _ReserveRegions()
- simplified a bit Layer::rebuild_visible_regions()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14335 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-07 16:05:22 +00:00
Adi Oanca
88ef6ce8fe - fixed build for NEW_CLIPPING define
- implemented RootLayer::SetActive(WinBorder*).
- added support for BWindow::Activate(). I realize now that I only added support for Activate(true). :-D In the next days I will add support for Activate(false).
- removed a few cases from ServerWindow as they are not needed.
- addapted WinBorder::MouseDown() to work with the new RootLayer::SetActive() implementation. 

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14318 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-06 10:45:46 +00:00
Adi Oanca
f59edb4bf0 - removed RootLayer::WinBorderAt(). Use Layer::LayerAt() instead.
- Added a skeleton for RootLayer::SetActive()
- removed Workspace::SetFocus(). Use AttemptToSetFocus() instead.
- properly implemented Workspace::_SetFocus().
- removed Workspace::fActiveItem - it had/has no use.
- fixed a problem with Decorator buttons being drawn improperly when
B_MOUSE_UP was generated outside their area.
- added 2 TODOs to later fix Decorator's (re)drawing path.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14295 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-02 21:55:45 +00:00
Adi Oanca
bbf8c95b5a * added Layer/WinBorder::WorkspaceChanged() hook.
* make RootLayer::SetWinBorderWorkspaces() work under NEW_INPUT_HANDLING
define. Soon I think I'll move this method under WinBorder's hood.
* RootLayer::change_winBorder_feel() is also working under this define

** NEW_INPUT_HANDLING define is active.
   If someone discovers something bad happening after this checkin please
notify me on app_server list. If in one week no major problems appear,
I'll remove this define and the old code.
   Thanks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-01 10:03:43 +00:00
Adi Oanca
8285d6b3c0 * implemented/fixed RootLayer::SetActiveWorkspace() under
NEW_INPUT_HANDLING define.
* added Layer/WinBorder::WorkspaceActivated()



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14270 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-09-28 21:12:38 +00:00
Adi Oanca
482a9b5d8c * replaced (Focus|Front|Active)WinBorder methods in RootLayer with shorter
names like Front|Focus|Active because in a not so later stage of
development these methods will return Layer* instead of WinBorder*
* fixed a problem where (floating) windows were not shown because their
visible regions were not cleared and taken as valid.
* fixed a bug where clicking on a border button actualy performed the
specific action instead of first activating the window.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14233 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-09-23 20:34:19 +00:00
Adi Oanca
42fb26b604 * changed the way we get data from the Window Manager (Workspace class for
now) (there will be a WindowManager class soon). We use a simple BList
now, for simplicity reasons; performance comes later :-).
* added RootLayer::RevealNewWMState() which will actualise the window list
and display/repaint differences between this state and the previous one,
including focus. It also sends B_WINDOW_ACTIVATED as appropriate. This
method removes other like get_workspace_windows(), draw_window_tab(),
winborder_activation(), show_final_scene() which were a bit confussing.
* ALL these changes are available under NEW_INPUT_HANDLING define which
isn't active yet. Soon...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14228 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-09-22 21:43:23 +00:00
Adi Oanca
534bc2c360 moving and resizing windows works very well now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14202 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-09-19 22:41:48 +00:00
Adi Oanca
1b65556d66 more work on the input handling. I let Layer/WinBorder handle the MouseDown/Moved/Up instead of doing this in RootLayer::MouseEventHandler(). I did this because I felt it's more clean and in the near future RootLayer may have other children than WinBorders, for example simple Layers representing tooltips/bubbles/etc.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14198 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-09-18 22:43:31 +00:00
Adi Oanca
8b94d5ecdd Work in progress for the new input handling stuff...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-09-16 05:10:21 +00:00
Adi Oanca
2138d632a6 In adding support for BView input events I got to rework/refractor the mouse input handling. This should be ready in a few days, so don't worry about the code being #ifdef-ed :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-09-08 16:53:42 +00:00
Adi Oanca
ffd509fd9b more code for input events. refractored some code in RootLayer class
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14119 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-09-05 18:55:32 +00:00
Adi Oanca
448f8b3243 update. added some code to support BView::SetMouseEventMask. code inactive ATM.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14107 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-09-03 18:08:49 +00:00
Adi Oanca
144022be62 Started to properly implement support for BView's events mask
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14106 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-09-03 17:55:16 +00:00
Jérôme Duval
7f74cecda3 added escapement_delta to AGGTextRenderer::RenderString and Painter
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-31 14:50:42 +00:00
Jérôme Duval
f2fd129852 now uses delta escapement
improved GetBoundingBoxesAsString (just for fun, keep in mind we'll use AGGTextRenderer in the end :) )


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14091 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-30 14:53:42 +00:00
Jérôme Duval
a37ea917be RotationBy now accepts radians, to be consistent among methods
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14087 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-30 09:57:37 +00:00
Jérôme Duval
f9d38575a1 now uses font shear in AGGTextRenderer
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14085 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-29 23:24:52 +00:00
Jérôme Duval
29926b974b completes previous commit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14076 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-26 15:03:36 +00:00
Jérôme Duval
c0058faecc first try at implementing ServerFont::GetBoundingBoxesAsString
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14075 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-26 15:02:53 +00:00
Jérôme Duval
3cf915cb23 spacing is needed for GetBoundingBoxes too (string case)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14072 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-26 08:47:17 +00:00
Jérôme Duval
697085a5aa shear is needed for GetBoundingBoxes
now uses _GetBoundingBoxes_ for GetBoundingBoxesAsGlyphs and GetBoundingBoxesAsString


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14071 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-26 08:40:24 +00:00
Jérôme Duval
2f23ef90dd added GetBoundingBoxesAsGlyph, GetBoundingBoxesAsString, GetBoundingBoxesAsStrings
real implementation with freetype still missing


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14062 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-25 15:21:34 +00:00
Jérôme Duval
af86ce75a0 copyright update
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14058 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-24 15:08:32 +00:00
Jérôme Duval
2b1263bedf reworked BFont::GetStringWidths and BFont::StringWidth
implemented BFont::GetEdges


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-24 14:50:41 +00:00
Jérôme Duval
2185eed6d2 implemented GetHasGlyphs for real
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14056 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-23 21:47:41 +00:00
Michael Lotz
3ddebe7ec2 Moved the CursorManager over to the Desktop too.
Maybe the CursorManager should be used to set the cursors directly instead of using
fDesktop->GetCursorManager.FindCursor() and then fDesktop->GetHWInterface()->SetCursor()
in ServerApp.cpp.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14033 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-21 10:28:40 +00:00
DarkWyrm
d863d4bf1d Made scanning of all font folders a compile-time option
Moved the scanning of individual font folders to FontServer
Implemented server-side code for update_font_families
Removed ClientFontList from the build


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13938 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-12 14:55:46 +00:00
Ingo Weinhold
2826a379d5 The app server for the BeOS test environment is now built by
src/tests/servers/app/Jamfile. This makes the original Jamfile much cleaner.
Note that you now have to maintain two Jamfiles when adding/removing sources.
The test app server is called haiku_app_server, its library
libhaikuappserver.so. I adjusted a few paths in scripts accordingly, but
I may have missed something elsewhere.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-29 14:44:35 +00:00
Stephan Aßmus
15ae8872f7 hacking session with Ingo part2: in the R5 test environment, the app_server links no longer against libbe.so, the classes which need it, ViewHWInterface + friends, are extracted into their own library, but we need a bridge library as well for HWInterface + friends. The AppServer is consequently no BApplication in the test environment anymore, the BApplication that is needed to display the frame buffer window is handled in ViewHWInterface. No functional change, except that our BRegion implementation is now used in the test environment, and who knows what else... luckily we are so extremely binary compatible, that passing a Haiku BRegion to the R5 app_server actually works.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-28 23:48:46 +00:00
Axel Dörfler
35a71b1936 The app_server now inherits from MessageLooper as well.
Removed unused stuff.
The app_server now deletes itself when done (and therefore must not be
allocated on the stack anymore).
The cursor handling should be moved over to the desktop as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13825 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-25 21:53:48 +00:00
Axel Dörfler
770c05d6cc The Desktop class now gets its own message processing loop: moved application
creation/deletion (and management) over to that class.
ServerApp now gets a desktop pointer, and no longer uses gDesktop.
Converted private MessageLooper::_MessagePort() to a public method MessagePort()
so that the looper can be addressed from elsewhere without using PostMessage().
Added a real basic message loop to MessageLooper::_MessageLoop().
BApplication now only asks the app_server to get its desktop object which should
now be used for everything that's not in the realm of the application.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-25 21:08:34 +00:00
Ingo Weinhold
18b5424c5f * Implemented BRoster::ActivateApp().
* Added the respective case statement in AppServer::DispatchMessage().
  The code that actually activates the app is still missing.
* Removed the remnants of the old way of notifying the registrar about
  what app got activated (the activated client window did that).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-24 21:10:33 +00:00
Stephan Aßmus
7b4cc5a1c7 this has come in handy several times now
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-24 18:35:52 +00:00
Stephan Aßmus
be85e14208 initializing the system palette before creating the desktop and driver fixes the bug that the desktop is first shown in the wrong colors on 8 bit screens
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-24 18:32:05 +00:00
Axel Dörfler
5f2edc0ffc The Desktop class now inherits from MessageLooper as well, the AppServer
class runs it, too.
No real message processing is done yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13816 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-24 17:14:17 +00:00
Axel Dörfler
c6a2527297 Split ServerWindow::Quit() into two parts, and moved the generic one to
the MessageLooper class - the other part is called from there as virtual
_PrepareQuit().
Moved the class documentation to the source file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13815 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-24 17:13:02 +00:00
Axel Dörfler
89ab121e66 Factored a MessageLooper class out of ServerWindow and ServerApp. Could still
be improved a bit (Quit() and _MessageLooper() are empty right now).
Removed ServerApp::PingTarget().
Hopefully cleared some confusion about ServerApp::fClientLooperPort and fClientToken
(previously fHandlerToken), even if it's currently unused.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13807 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-23 18:30:48 +00:00
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