Commit Graph

2320 Commits

Author SHA1 Message Date
Axel Dörfler
89d522a443 AccelerantHWInterface should no longer rely on GetModeList() being called before
working with it. The app_server would have crashed before if a graphics driver
could directly return a preferred display mode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22595 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-17 14:20:58 +00:00
Axel Dörfler
f6e4cbb952 * Rewrote BeBuild.h which had "a few" consequences (got rid of all those class
definitions).
* Minor cleanup here and there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 20:13:55 +00:00
Axel Dörfler
c278448653 * Introduced a monitor_info structure and means to let it be filled by the
accelerant (or the app_server via EDID info). It's still experimental
  API, and opinions are welcome.
* Moved BPrivateScreen into the BPrivate namespace.
* Rewrote Screen.h.
* Introduced a BScreen::GetMonitorInfo() method, and implemented it in the
  app server as well (ie. AS_GET_MONITOR_INFO).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 11:41:47 +00:00
Axel Dörfler
7e9f5d25d3 * WindowLayer::InWorkspace() was actually nowhere used the way it was
implemented; it now only returns wether or not the window is part of the
  list specified by the index. This fixes bug #195 and #1553.
* HasInSubset() would report "true" for app-floating windows vs. modal app
  windows which was wrong.
* Removed SameSubset() as it isn't needed at all.
* SubsetWorkspaces() now take the front window into account for floating
  windows.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-14 11:03:57 +00:00
Ingo Weinhold
190e377976 ppInfoList deletes its elements on destruction, and we didn't clear our
temporary list after deleting its elements manually.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-13 16:15:49 +00:00
Axel Dörfler
4191a211aa * Started accelerant extension to be able to get the preferred mode from
the accelerant, as well as its EDID info. B_GET_PREFERRED_DISPLAY_MODE and
  B_GET_EDID_INFO are both optional. The preferred mode will be taken from the
  EDID info if only the latter hook is implemented, or the former returned an
  error.
* Currently, the app_server should correctly set the preferred mode on start,
  but no accelerant supports that yet, so it's not really tested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-12 16:50:24 +00:00
Stephan Aßmus
4d1c422802 * added a way for the ServerWindow message loop to determine the required type
of locking before processing the message (single/all window lock)
  -> in most message cases, I could comment out the unlocking/locking which
  switched to the different lock, because the required lock is now already held,
  this removes some race conditions which were commented in the code already
* EventDispatcher::SetDragMessage() didn't lock the object, this would have
  been bad if multiple windows tried to set a drag bitmap at once
* the Desktop object keeps track of mouse position and pressed buttons, so
  that it doesn't need to lock the EventDispatcher for sending fake mouse
  moves to windows on show/hide of windows (solves some cases of possible
  dead locks with the new locking strategy)
* the keyboard EventFilter switches the current workspace asynchrnously from
  the Desktop thread (another source of possible deadlocks)
* the "reader is trying to become writer" check in MultiLocker is only used
  in DEBUG mode now

As a summary: It would be nice if ServerWindow used a readlock for all messages
it processes itself, and forwards all messages for which it needs a write lock
to the Desktop thread. All cases where either the Desktop or the ServerWindow
mess with the EventDispatcher are possible sources of deadlocks. This is solved
right now by making sure that the lock is released before using the
EventDispatcher.

I have not observed any deadlocks while switching workspaces and launching
many apps anymore, neither crashes. But I have not tested extensively except
for in the test environment. That being said, I could reproduce the problems
on first try before in Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 14:09:11 +00:00
Axel Dörfler
e2693621b6 Correctly implemented the missing BBitmap::GetOverlayRestrictions() on the
client and the server. This should fix bug #1490, but I haven't tested it yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22388 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-30 16:03:53 +00:00
Axel Dörfler
64fd7c1a00 This fixes the problem of launching more than one document with one application
at once with Tracker (eg. launching several text documents) - only the first one
would have been opened, and an error B_BAD_VALUE would have been reported for the
others:
* HandleAddApplication() did not return the correct token in case of a
  pending registration; therefore, BRoster::_LaunchApp() would try to
  check the registration with invalid arguments.
* HandleIsAppRegistered() put the pending registration requests into
  the fIARRequestsByToken map using the wrong key, so that they could
  not be found again.
* Minor cleanup (fixed indentation of not so temporary debug code).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22296 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-24 21:48:06 +00:00
Stephan Aßmus
158001f57d * fractional rects need to be aligned if not drawing in subpixel precise mode,
by now, I feel there is too much code involved in this... I guess I should
  really move this to stuff to ViewLayer::ConvertToScreenForDrawing()...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-12 08:18:09 +00:00
Stephan Aßmus
72c9d31ec4 * transmit correct type in BView::BeginRectTracking()
* put message codes for Begin/EndRectTracking() into giant switch... not
  actually implemented though


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22220 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-11 21:23:07 +00:00
Stefano Ceccherini
945d8d11cd Sync the drawing engine state in set_scale. The pen size, for example,
needs to be recalculated when the scale changes.
Also call ResyncDrawingState() in exit_state_change(). This fixes the 
pen size test in FlattenTestPicture.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-10 11:56:28 +00:00
Stefano Ceccherini
b1af0a7a24 Setting the font shear in a BPicture didn't work, because the value was
treated as uint32 in some places, when it's a float.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-10 10:20:26 +00:00
Stefano Ceccherini
af02a9a71c Use DrawState::PenSize() to set the drawing engine pen size, since it
returns the scaled value.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22213 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-10 09:43:02 +00:00
Axel Dörfler
8a3cfa2cf3 * Made menu windows behave differently than others: before, they were just
always put between window screens and modal all windows (before floating
  all ones), so a BWindowScreen couldn't have menus at all.
  Now, they behave more like floating app windows, just that they float above
  all other application windows, such that all window feels (also BWindowScreen)
  can now have menus.
* Reenabled keyboard redirection to the top most window in case it's a menu;
  bug #1152 no longer applies due to the above change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22149 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-02 12:16:28 +00:00
Axel Dörfler
a632458d8e The wonders of signals:
* Since the app_server launched the input_server, it would also get notified
  when the latter died via a signal - but LinkReceiver could return B_INTERRUPTED
  in that case (it didn't check the return value of port_buffer_size()) which
  the app_server misinterpreted and quit itself... this fixes the hanging part
  of bug #1298.
* But the input_server still wasn't restarted, because the Registrar had it
  still listed as being running. Now, the Registrar checks not just periodically
  for died teams, it will also check for it when a new application registers
  itself. This fixes the rest of bug #1298.
* Removed the old (disabled) R5 style input_server launch mechanism from the
  app_server.
* MessageLooper now prints a bit more information when a port is supposed to
  have been deleted.
* The default implementation of MessageLooper::_GetLooperName() is now
  returning the name of the semaphore of its BLocker instead of "unnamed
  looper".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22115 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 00:09:43 +00:00
Stephan Aßmus
e749c485ed * this fixes the second part of #1426, unfortunately, the clipping checks
have become more expensive, so maybe it is better to do what I proposed
  in the ticket comments, and move the rounding of drawing command coordinates
  into ViewLayer::ConvertToTopForDrawing() instead of handling it in
  DrawingEngine and Painter


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22060 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 14:31:49 +00:00
Stephan Aßmus
561844529d * implement FillRect() with B_OP_INVERT using hardware acceleration like
FillRegion() is already doing (untested)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22059 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 14:23:06 +00:00
Stephan Aßmus
307d439902 * reenabled implementation of "false bold width" font feature
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22037 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-22 14:15:07 +00:00
Stephan Aßmus
c5c3b078e7 * clarified comment
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22036 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-22 14:14:30 +00:00
Stephan Aßmus
15a6a1bd6d * more pleasing insets/offsets and the proportion of the zoom button scales
with the font size


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22005 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-17 16:24:01 +00:00
Stephan Aßmus
f7e1df7560 * get rid of RGBColor usage where it is not needed, this simplified many things,
possibly making them a little faster too
* mess with decorator button size calculation to make the whole layout scale
  more agreeable with the font size (no more fixed offsets/insets), but it
  is work in progress
* DefaultDecorator no longer allocated the border color array, it is part of
  the object now
* small memory footprint optimizations in ViewLayer, Decorator and WindowLayer


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22003 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-17 12:56:20 +00:00
Michael Pfeiffer
1623ec9289 Bug fixes:
* origin is given in "outer" coordinate system therefore if there is a
 previous state it has to be transformed. Please review if this is
 required in OffsetOrigin() too.
* in Transform() we have to scale relative to the view origin not (0 /
  0).

- optimized SetScale: saved one division


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21993 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-17 07:04:46 +00:00
Stefano Ceccherini
422fadc829 Moved the dummy table local to the PicturePlayer::Play() function since,
as Marcus pointed out, having it outside wasn't thread safe. Moved 
PicturePlayer into the BPrivate namespace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21982 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-16 14:40:03 +00:00
Stefano Ceccherini
46b4e48998 Added some debug output to PicturePlayer. Since checking the table size for every op is very slow, now we do that only at the beginning, and use a custom op table if needed. The best case (which is the one used when drawing a picture with BView::DrawPicture()) is very fast since it only requires one check.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-16 09:14:03 +00:00
Stephan Aßmus
91d0586a7d * it should be better to lock before accessing the data, even if reading only
* after this change, I have not spotted "left behind" cursors again, but it
  might just be bad luck...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21966 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-15 19:06:11 +00:00
Ithamar R. Adema
3b1dcc1e09 Fix GCC4 compilation issue.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21950 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 18:38:47 +00:00
Stefano Ceccherini
253d42a602 Implemented SetClipping op, but it's not working yet (looks like it's
never written into the data stream)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 15:21:15 +00:00
Stefano Ceccherini
796e4e4552 Implement calling the exit_xxx hooks. Thanks to Marc Flerackers for the
help.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21943 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 12:45:42 +00:00
Stefano Ceccherini
9cc1cb3cae Disabled writing the font shear, since this results in missing font in
Chart's BPictureButton. Needs some investigation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21942 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 09:43:19 +00:00
Stefano Ceccherini
feb557a6d1 Implemented WriteSetFontFamily() and WriteSetFontStyle(). Only the
server side functions are missing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21941 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 09:17:21 +00:00
Stefano Ceccherini
2f99607b77 My last commit broke setting fonts in BPictures. Added a comment in
PicturePlayer to explain what we need to do. Don't write the 
B_PIC_ENTER_STATE_CHANGE and B_PIC_ENTER_FONT_STATE ops until we fix the 
problem (we don't care about them in our server side 
implementation anyway). Font changes and state syncing work again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21940 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 08:40:13 +00:00
Stefano Ceccherini
c00e6e3f89 Implement more bpicture font methods, now PicturePlayer checks the size
of the function table, so if someone passes a smaller table, we avoid
 
calling invalid pointers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21939 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 08:05:05 +00:00
Stefano Ceccherini
8e503a70c8 Also set the font properties for BPictures. Some of them, at least.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21938 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 07:37:51 +00:00
Stefano Ceccherini
37033892c5 Implemented SetPattern op. Reduced the buffer size to 4096 again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21937 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 06:39:37 +00:00
Stephan Aßmus
8f4f70a56d * implemented a lock up table for drawing text in B_OP_COPY,
maybe this is too resource hungry, feel free to critisize... :-)
* the speedup is there, but not overwhelming


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 17:09:20 +00:00
Stefano Ceccherini
38daa5cd6e Also upload/download subpictures
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21926 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 14:52:02 +00:00
Stefano Ceccherini
690c7474a4 Implemented BPicture's SetPenLocation() op, also nested
AppendToPicture() (but still doesn't work :( ). Moved some functions 
around in PictureDataWriter.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21925 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 14:07:12 +00:00
Stefano Ceccherini
b1b69140a1 Don't delete the subpictures in the ServerPicture destructor. They are
kept in a list by ServerApp, and deleted by its destructor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21924 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 13:52:16 +00:00
Stephan Aßmus
ea6280b6d5 * maybe I fixed the sometimes weird decorator buttons, I have not spotted them again with this change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21922 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 09:27:18 +00:00
Stephan Aßmus
a2d6475360 * fixed usage of hardware accelerated inverting, of course we shouldn't do it again in software after we have done it in hardware...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21921 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 09:26:27 +00:00
Stefano Ceccherini
edac8f06a8 Implemented drawing of pictures inside pictures. Thanks to Marc
Flerackers for clarifying some things.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21920 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 09:19:30 +00:00
Stefano Ceccherini
ac5fdd8a6d Fixed drawing of arc and ellipse in a BPicture.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21919 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 07:38:44 +00:00
Stefano Ceccherini
ed5de868df Implemented the following BPicture ops: fill region, stroke/fill arc,
stroke/fill polygon, stroke/fill bezier. some work towards drawing of 
nested pictures.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21918 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 07:20:43 +00:00
Ingo Weinhold
ac7fc18b09 Always allow debugging a team, even if it wasn't possible to get its
executable path. It seems, gdb doesn't produce very helpful stack traces
then, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21915 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-12 23:49:38 +00:00
Ingo Weinhold
7e8ac2903b * Prefixed the variables NETWORK_LIBS, NETAPI_LIB, and
SELECT_UNAME_ETC_LIB with TARGET_ and introduced HAIKU_* and HOST_*
  counterparts.
* Use HOST_NETWORK_LIBS for building remote_disk_server.
* Also got rid of {R5,BONE,DANO,HAIKU}_COMPATIBLE.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21912 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-12 22:15:10 +00:00
Stephan Aßmus
5a626bd963 * removed code duplication in BView::check_lock() and do_owner_check(),
* revised use of check_lock() versus do_owner_check() (do_owner_check()
  is supposed to drop you into the debugger if there is no owner, otherwise
  it behaves like check_lock())
* ConstrainClippingRegion() no longer transmits empty regions to the
  app_server. I would have thought that my fix to ServerLink would have
  solved the issue I was investigating, but only this commit fixes it.
  Maybe the last commit would have fixed it if I did a "jam clean"...
* WonderBrush draws the icons again on mouse over...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-12 13:14:09 +00:00
Stephan Aßmus
8c1a98d8d4 * there was a complete mixup of "drawing origin" and "scrolling offset" in the
BView implementation (client side)
* introduced some private methods for _Convert*(BPoint*) methods which avoid
  doing the check_lock() thing in the recursion, also Origin() would likely
  have communicated with the app_server all the time, since the origin bit
  was needlessly invalidated, so some speedup should be achieved
* this should fix ticket #98


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-12 09:52:25 +00:00
Stephan Aßmus
95baf31294 * view accepting bitmaps are now cleared to white
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21895 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-11 15:56:37 +00:00
Stephan Aßmus
aadc09c665 * fix the mixup of charCount (glyphs) versus bytes. The new font cache
implementation takes the byte count, even though it looks like this is
  less efficient when the glyph count is already known (I tested to
  optimize it away but it was not faster)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-11 13:34:09 +00:00