Commit Graph

339 Commits

Author SHA1 Message Date
John Scipione 4bb5af765f Add control mark color setting. #8054
An enhancement adding a setting to Colors under Appearance to
set the mark color of radio button and check box controls.
2012-07-15 15:09:04 -04:00
Axel Dörfler 8e2140fa5e Fixed a large client side memory leak for app_server memory.
* The areas allocated for BBitmaps were never deleted, even though the
  app_server deleted its part when the memory got freed.
* This resulted in a constant memory increase if the application in question
  would operate on many changing large bitmaps, like photos.
* Since the bitmaps are reference counted, we don't actually know when to delete
  the areas, so that the app_server now notifies the client whenever that is
  possible.
* This might fix #6824.
2012-04-29 20:26:14 +02:00
czeidler 5dbc26dc0a Add AS_RECONNECT_BITMAP to the server protocol. 2012-01-22 15:30:17 +13:00
czeidler 6c40fc5dfc Reconnect BApplication and trigger reconnect of all BWindows in an application.
* handle bitmap reconnect request in the app server
2012-01-22 15:30:16 +13:00
czeidler 04209cdd81 Catch a app_server crash in the debug server. Let the registrar restart the app_server and notify all apps. 2012-01-22 15:30:14 +13:00
John Scipione 3b1791fa15 80 char limit fix. 2011-11-13 15:47:27 -05:00
John Scipione 30d17caa9d Added support for colored window tabs in the default decorator. 2011-11-13 14:58:21 -05:00
Axel Dörfler ef88976995 * Reinitialize global locks after a fork (at least those in the Application
Kit).
* This should fix #5668.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42982 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-29 21:17:59 +00:00
Axel Dörfler 78fcc847a2 * Coding style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42981 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-29 21:04:22 +00:00
Axel Dörfler cefef1c371 * Header cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42304 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-24 18:22:02 +00:00
Axel Dörfler 8c5a0accf5 * Do not reserve memory when the area is too large. This fixes #7740 where the
reserved amount was simply too small, but also works around address space
  waste with many larger bitmaps.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-24 17:04:50 +00:00
Axel Dörfler e3feb1f8af * Added a new AS_DUMP_BITMAPS command.
* Extended app_server_debug command to be able to send it, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-23 21:50:12 +00:00
Clemens Zeidler da1c93175d Revert r39462 because it was not really binary compatible.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-17 22:19:09 +00:00
Clemens Zeidler a5cf354a27 Add protected RestoreState, SaveState functions to BApplication. HasBeenRestored can be used to check in ReadyToRun if the RestoreState function has been called. The default implementation just store the window geometry and the decorator settings. Subclass implementations can use the global restore_window_geometry, save_window_geometry function for convenience. Please review. Will commit a simple session manager tomorrow.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39462 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-17 04:38:48 +00:00
Axel Dörfler 1d219b3a25 * Added AS_DUMP_ALLOCATOR command that dumps an applications memory allocator to
the syslog/serial output.
* Added app_server_debug command that currently just sends this command to the
  specified teams.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39441 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-15 21:25:03 +00:00
Clemens Zeidler c0eff34541 Remove unused PortLinkRef again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38217 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 23:27:22 +00:00
Clemens Zeidler c0494bc592 Add facility to communicate with the desktop listener over an app server link. The ServerWindow dispatch the message to the DesktopObservable which dispatch it to the correct listener.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38169 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 06:25:55 +00:00
Clemens Zeidler 38d80987f3 Add PortLinkRef class which use a existing sender and receiver for communication. Suggestion for a better name?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38167 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 06:12:30 +00:00
Ingo Weinhold fbb6335d2a Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 15:04:38 +00:00
Ingo Weinhold e5150e2847 Patch by Alex Wilson (compilation fixes by myself): Extended the archiving/
unarchiving protocol to support archival of arbitrary object graphs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37431 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 14:54:25 +00:00
Stephan Aßmus 33394b856d Patch by Wim van der Meer: Added get_mouse_bitmap() global method to
InterfaceDefs.h and corresponding implementation in the app_server. Thanks a
bunch! Closes ticket #5978.

A note to those using "update-all" with hybrid builds - the alternative GCC
system libs will not be updated this way, and this and Wim's last patch
change the libbe <-> app_server interface. You need to manually update the
respective libbe.so, or do a clean build, otherwise apps for the other GCC will
not start anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-16 15:51:54 +00:00
Stephan Aßmus 1c73ffa102 Patch by Wim van der Meer: Implemented global Interface Kit function to retrieve
the current mouse position and pressed buttons. I've changed the return code
to status_t and added anal error checking, most of the rest of the file is not
doing it, though... :-) Thanks, Wim!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-14 15:53:09 +00:00
Ithamar R. Adema b13b0b0f4e * Make sure LinkSender knows team ID of receiving team; this fixes the >64k ServerLink transfers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 14:26:19 +00:00
Stefano Ceccherini f0330c4aff Removed AreaLink, not used
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35914 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-19 17:29:10 +00:00
Stephan Aßmus 77e5acc0d9 * Extended the BView drawing API by a DrawString() version that takes an array
of locations, one for each glyph.
 * Added a test for the new functionality.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-15 13:59:14 +00:00
Stephan Aßmus e59dc33e21 * Added BCursorID enumeration in App Kit's Cursor.h and new constructor which
takes such an id.
 * Reused the existing mechanism to to have hardcoded tokens for the system
   cursors, i.e. removed cursor_which enumeration from ServerProtocol.h and
   used BCursorID where cursor_which was previously used.
 * Reworked CursorManager.h and CursorSet.h accordingly and removed some methods
   that where intended to replace system cursors with client cursors, since
   those would break the reference counting and forget to maintain the cursor
   list.
 * Replaced the cursors in CursorData.h/cpp with the new ones I just designed.
 * Removed HaikuSystemCursor.h and HaikuLogo.h from the source, as those are/were
   no longer used.

I hope I will not get too much beating for this one... :-) I know the new
default cursor is slightly larger, but I believe the old one was just too small.
Also I noticed that the cursor may be slightly too dark, at least the old one
seems noticeably brighter when compared side by side (the new one has a slight
gradient). That is something I may correct at least. Otherwise I hope nothing
is broken, I've tested in QEMU and so far everything works as intended.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-07 23:12:34 +00:00
Rene Gollent 4f85bc9f18 Cleanup of previous work: whether or not we're talking to app_server is already determined at time of port assignment. As such we don't need to cache or care about that, but rather just cache the target team instead of looking it up from the port info every time.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-28 23:25:23 +00:00
Rene Gollent 099f9551c7 Cache the app_server port lazily so we don't have to look it up every time.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-28 22:55:43 +00:00
Artur Wyszynski cee04e8074 Fixed various errors/warnings reported by cppcheck:
* memory leaks
* resource leaks
* added const's to getters
* removed a few reundant conditions


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-08 22:50:38 +00:00
Axel Dörfler ec1bcf6243 * Added private methods get_app_server_port() (that stores the server port,
and doesn't have to find it every time), and create_desktop_connection() that
  is now used from BApplication::_ConnectToServer() as well as the DesktopLink.
* Move PortLink::SetTo() into base class ServerLink.
* Eliminated duplicated member fReplyPort in DesktopLink.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-01 07:53:09 +00:00
Ingo Weinhold 4701b640d9 * Give the BClipboard lock a name.
* be_clipboard is no longer created at libbe initialization time. The
  BApplication creates it as done in BeOS. This requires manual
  initialization in the registrar to avoid a deadlock on shutdown.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34388 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-30 17:14:00 +00:00
Ingo Weinhold 240a2c89e8 Removed no longer needed gInitializationLock.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34385 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-30 16:34:13 +00:00
Ingo Weinhold 4b9cf09f14 * Got rid of is_running_on_haiku(). It was used for the test environment,
but wouldn't work when running it on Haiku anyway. At any rate, it was
  relatively expensive (uname()) and used already in the libbe
  initialization.
* Got rid of the non-Haiku support of main_thread_for().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34371 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-30 12:14:02 +00:00
Axel Dörfler 15fe75b9a0 * Added a protocol version field to AS_GET_DESKTOP. This should be bumped after
incompatible releases, and makes sure clients using the old libbe.so will be
  rejected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-24 17:22:44 +00:00
Axel Dörfler 29e37d8842 * Made BTokenSpace not throw any exceptions on memory shortage.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33874 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-04 12:19:59 +00:00
Axel Dörfler 7691a788d0 * Minor cleanup, updated copyright.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33762 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-25 15:14:49 +00:00
Rene Gollent 203049400f Also remove _B_APP_INFO_RESERVED1_ as it's used for nothing whatsoever.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33758 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-25 13:11:29 +00:00
Rene Gollent 75f60c8b38 Set default flags to B_MULTIPLE_LAUNCH only, as is the case on BeOS. This fixes issues where apps that forgot to specify flags in their resources would be unable to receive remote messages.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33755 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-25 03:34:24 +00:00
Brecht Machiels 926e63c885 * added click to focus mouse mode; right-click for bring-to-front and send-to-back
(might cause some regressions in FFM)
* made accept first click user configurable
* updated the Mouse preflet to use the layout kit
* removed the warp and instant warp modes from the Mouse preflet
* changed internal representation of mouse modes (warp modes moved)
* coding style fixes



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33732 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-22 21:10:19 +00:00
Oliver Tappe e0b7c61c46 Closing ticket #4465:
Net_server starts services by invoking fork() followed by exec(). If the latter
fails (for instance because the service isn't installed), the forked child is
invoking exit(). This in turn unloads libbe, triggering static cleanup code in 
BMessage, which deletes a couple of message ports that were inherited from the
parent during the fork. After that, net_server was desparately missing those
ports and no longer worked reliably.
* in InitTerminateLibBe, we now register an atfork-(child-)handler, which
  takes care to re-initialize the static reply ports used by BMessage code
* added BMessage::Private::StaticReInitForkedChild wrapper and 
  BMessage::_StaticReInitForkedChild() implementation which overwrites the
  inherited port IDs with a set of own ports


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33050 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-10 23:10:51 +00:00
Axel Dörfler 9fe35223cf * BWindowScreens had no sychronization mechanism whatsoever - since the
workspace activation message was asynchronous, whether or not the
  BWindowScreen stopped drawing in time was pure luck (this also caused crashes
  with the VESA driver, as that one unmaps its frame buffer during mode switch).
  Introduced a new AS_DIRECT_SCREEN_LOCK protocol for this.
* In the long term, we should let BWindowScreen use the same mechanism as
  BDirectWindows, though.
* Removed superfluous locking in BDirectWindow::_InitData().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-27 12:10:59 +00:00
Axel Dörfler e18224cdf4 * Added a new AS_GET_SCREEN_FRAME function, as getting the frame via
AS_SCREEN_GET_MODE won't work with multi-screen support anymore, and is also
  more overhead than needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32559 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 10:23:01 +00:00
Axel Dörfler 2c69b5b6c0 * Made the libbe_test environment basically working under Haiku - to actually
make it work, one would need to use versioning for all libbe symbols. This is
  worth an 8k price per file that links against libbe.so, so I didn't want to
  commit this as is. An alternative to this solution would be to write a
  separate application that is responsible for the app_server's window. Comments
  welcome.
* Removed BeOS compatbility of the libbe_test stuff.
* Renamed the libbe_test targets from *haiku* to *test*, ie. libbe_haiku.so is
  now called libbe_test.so, haiku_registrar is now test_registrar, etc.
* This also removes BeOS compatibility from tracker/FSUtils.cpp (all BeOS
  compatibility should be removed, but I don't want to make Alexandre more work
  in his branch, and it's not urgent at all).
* Replaced the former "run" scripts for the test environment with a single
  run script (see updated NOTES file).
* Removed the libbe_test target from some applications - this was only to help
  developing them under BeOS, and is thus no longer necessary.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-19 14:17:13 +00:00
Michael Lotz d7a16b238f * Fully switch to the Haiku message format so that it is also used for on-disk
storage.
* Remove reduntant information from the header (field_count vs. fields_size).
* Remove checksums previously used to validate the message passing by area
  mechanism.
* Move variables that are purely used by the instance out of the header and into
  the BMessage object.
* Use more sensible types for the different message fields.
* Reduce some field sizes to realistic values.
* Make size_t values into uint32 values so the message format will not change
  when later moving to 64 bits.
* Pack the structures used for flat message storage so it doesn't change
  because of padding.
* Fix message passing by area. It never worked because the created area was
  never actually filled with any data!
* Some more allocation checks with graceful fallbacks (should be all now).
* Some more checks for negative index values (should also be all now).
* Make printing more inline with how the rest of the class works and make some
  of the output more consistent.
* Also add the new unsigned types to PrintToStream() output.
* Fix printing of unknown types and invalid BMessages, it would always have
  printed only the first entry respectively the same error.
* Added some clarifying comments.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32039 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-31 22:19:36 +00:00
Axel Dörfler 69f9a367bc * The app_server no longer uses workspace counts internally, but only columns,
and rows.
* set_workspace_count() now uses the logic formerly found in
  WorkspacesView::_GetGrid() to determine the layout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 00:52:21 +00:00
Axel Dörfler 47d9ed62d3 * Added AS_GET_WORKSPACE_LAYOUT to get the number of columns/rows of the
workspaces.
* Added shortcuts Ctrl-Alt-{Left|Right|Up|Down} to switch to adjacent
  workspaces.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-27 17:22:11 +00:00
Stephan Aßmus 19e179ca4f * Moved the implementation of SetViewCursor from the thread of the
window of the view into the application thread. This solves the
  race condition with asynchronous SetViewCursor and deleting the
  cursor immediately afterwards for real.
* The ServerApp now requires a reference to the current cursor,
  just in case...
* Added TODOs for caching the BView token, it's currently resolved
  for every single BView call that talks to the server... not good!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31133 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-20 12:11:49 +00:00
Stephan Aßmus 5d62f8e0e5 Make it possible to properly use operator= on BCursors by making sure the
reference counting is maintained correctly in the app_server. While reviewing
this code, I have my doubts that my previous solution for handling pending
SetViewCursor() calls is always working as it is intended.


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


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-16 21:59:05 +00:00