Commit Graph

14987 Commits

Author SHA1 Message Date
Stephan Aßmus
8c8275c2ea showing and hiding windows and views works now, views are not so heavily tested, but any problems should be easy to fix. the recursive IsHidden() is now avoided, there is only one recursion now, which is when the hidden status changes. in the simulation, double clicking a window will temporarily hide it and show it asynchronously from the window thread. looks like the locking model works out fine.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15272 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-01 17:24:47 +00:00
Axel Dörfler
2057d3c0aa If AddToSubset() fails, we now show an error alert.
B_QUIT_REQUESTED is no longer forwarded to the application too early.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15271 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-01 17:08:16 +00:00
Axel Dörfler
7ae647775e Completed functionality - you should now be able to test pretty much everything
with respect to look/feel/flags.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15270 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-01 16:50:21 +00:00
Axel Dörfler
aecd5eefaf * the check for a valid feel was wrong, reported by Michael Lotz.
* also followed Michael's suggestion (more or less) and moved the
  look/feel/flags checks into separate methods.
* on construction, invalid look/feel/flags values are now corrected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15269 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-01 15:58:04 +00:00
Axel Dörfler
6b86db1c42 Changing window flags that affect the look does now also work more or less fine.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15268 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-01 15:02:11 +00:00
Axel Dörfler
05aea1dd4a Better app_server communication for SetFeel(), SetLook(), and SetFlags().
SetFeel() gets a status value back as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15267 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-01 14:56:44 +00:00
Axel Dörfler
85f8bb71c7 * You can now change the look of a window on the fly.
* renamed some Decorator functions like GetLook() to Look().
* renamed _look to fLook and _flags to fFlags.
* removed the feel from decorators - they don't need to know
  or care about the feel.
* the DefaultDecorator didn't allow resizing of modal windows.
* DefaultDecorator::SetTitle() no longer clears the passed
  in updateRegion, it just fills it (so that you can call
  more than one of these methods after the other, and still
  get a correct update region).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-01 14:56:01 +00:00
Axel Dörfler
57be286609 * when moving/resizing windows on another workspace, the Workspaces window
has to be udpated anyway.
* some work towards being able to set a window's look/feel/flags on-the-fly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15265 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-01 13:59:04 +00:00
Axel Dörfler
5c01706db6 Again, did only compile under BeOS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15264 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-01 13:23:13 +00:00
Axel Dörfler
a7e6679b88 Beginning of a test application for look&feel (and flags, actually).
Only look & flags are tested right now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15263 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-01 13:21:33 +00:00
Axel Dörfler
5d32708515 Implemented B_AVOID_FOCUS support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15262 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-01 12:31:05 +00:00
Axel Dörfler
85096c8acb Some cleanup:
* look/feel are now window_look/window_feel instead of int32.
* removed the level stuff, I don't think this is needed.
* some other minor stuff.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15261 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-01 12:07:28 +00:00
Axel Dörfler
649e929c7a Added drawing the window titles to the Workspace window - but I disabled
it, as it slows down window moving noticeably.
To provide a good Workspaces window functionality, we should probably let
WindowLayer take care of the updates itself - that would simplify the whole
thing a lot.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-01 11:43:04 +00:00
Axel Dörfler
a1d0e588b9 Another use of clipping regions to eliminate flickering. Maybe I have to come
up with something better though, when the window titles are drawn as well...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15259 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-01 10:41:01 +00:00
Axel Dörfler
19d801a6b6 Moving/resizing is now routed over the desktop as well.
This also allows the workspaces layer for these actions, which is now done as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15258 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-01 10:31:30 +00:00
Ingo Weinhold
b22fc00fa8 Fixed invalid use of STL vector. I wonder, why I always involuntarily
shudder when looking into MDR code (and happily use Beam). Error
checking, anyone?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15257 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 23:55:02 +00:00
Ingo Weinhold
9a8ef58959 Build fixes for gcc 4 by Ilzu Siiteri. Small changes by myself.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15256 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 23:41:40 +00:00
Stephan Aßmus
d0e89d5302 I couldn't resist playing some more with ezprof. I don't know if I can trust it's results though, revealing as they are. Somebody should explain to me why forgetting a return *this; in an operator= method works in the first place, and why it results in the constructor being called.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15255 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 23:03:05 +00:00
Axel Dörfler
b32a299f2a Minor cleanup, mostly SERVER_TRUE -> B_OK.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15254 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 22:48:42 +00:00
Axel Dörfler
a8b49ab310 Implemented AS_COUNT_WORKSPACES and AS_SET_WORKSPACE_COUNT server side.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15253 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 22:48:13 +00:00
Stephan Aßmus
c8b8bbfca4 fix the update session operator=, temporarily enabled Flush()ing the underlying BView again in order to not distract with fake drawing bugs
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 20:51:39 +00:00
Stephan Aßmus
7fd1af6f04 I did some profiling using Daniel Reinholds ezprof, which is quite nice actually. I optimized a bit, without spending too much time on that yet, and now the clipping is on average 7 times faster than the current app_server (the time spend in the root layer thread)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15251 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 20:35:47 +00:00
Axel Dörfler
5ca8477eca * the Workspace class is now hidden and put into Workspace::Private; the new
Workspace class is a simple accessor to this class that takes care about
  locking (currently, it's just the desktop lock, maybe it'll stay that way).
* WorkspacesLayer now displays the window thumbs again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15250 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 19:56:44 +00:00
Axel Dörfler
ed656a3a9b You must not have RootLayer locked when calling any method from EventDispatcher;
just another case of troublesome generic RootLayer locking in ServerWindow
(I'm looking forward to get rid of this).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15249 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 19:51:43 +00:00
Axel Dörfler
6aae81b3e1 Quick and dirty fix to allow our heap to allocate more than 64kB.
However, it will never free those allocations again.
This fixes the problems due to Rudolf's recent driver updates.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15248 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 19:28:46 +00:00
Stefano Ceccherini
983af123cd Obviously forgot to svn add
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15247 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 18:43:57 +00:00
Stefano Ceccherini
f505f1798d Added a jamfile for NewRegionTest. Small changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15246 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 18:43:26 +00:00
Stefano Ceccherini
4639f874c7 You shall compile before commit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15245 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 18:37:15 +00:00
Stefano Ceccherini
3106b9ec41 You shall not break the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15244 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 18:33:21 +00:00
Stefano Ceccherini
17adbf1f0c Misc style changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15243 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 17:56:56 +00:00
Axel Dörfler
dd43887c95 Forgot to remove the Unlock(), thanks to Stephan for pointing this out.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15242 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 16:22:18 +00:00
Axel Dörfler
a631158a62 Reenabled most of the workspaces functionality - the Workspaces window doesn't
show any windows, but everything else seems to work fine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 15:47:01 +00:00
Axel Dörfler
92766f93e2 EventDispatcher::_Unset() did not wait for the event looper thread under BeOS, as
wait_for_thread() always returns B_BAD_ADDRESS when the second argument is NULL
(it works fine under Haiku).
Instead of enqueuing a B_QUIT_REQUESTED message, InputStream now directly quits
when the 'quit' code is read from the port (B_QUIT_REQUESTED was never handled
by the event loop either, it just didn't get noticed because of the wrong
wait_for_thread() usage).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15240 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 15:31:33 +00:00
Axel Dörfler
66fdfb907b Some preparations to reactivate the workspace feature.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15239 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 11:19:20 +00:00
Axel Dörfler
15918e4fa5 * new windows now get a fake B_MOUSE_MOVED message in case they are opened
directly under the mouse cursor.
* Added Desktop::ShowWindow() and HideWindow().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15238 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 10:45:01 +00:00
Stefano Ceccherini
927995cedd Fixed some bugs reported by Stephan. You were right after all :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15237 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 09:12:24 +00:00
Stefano Ceccherini
5c2728e222 A slightly different region implementation, not tested or anything
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15236 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 06:23:00 +00:00
Stephan Aßmus
7e68917fe7 more commenting, if only to clean up my own mind
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-30 00:29:19 +00:00
Stephan Aßmus
1ba9992d13 a views screen clipping does no longer includes the windows actual clipping, only the content clipping, this simplifies some calculations, and avoids invalidating each views screen clipping when the window clipping changes. at any time the views screen clipping is used, we need to watch out for the effective clipping anyways
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15234 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-29 21:21:12 +00:00
Stefano Ceccherini
414b75712d Style changes, just to test if committing from here works...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15233 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-29 21:17:02 +00:00
Stephan Aßmus
312345bcb1 with the new design, there is always only one redraw message in the WindowLayers message queue, therefor, ReadLockWithTimeout() is no longer needed, removed RWLocker again as MultiLocker suits our needs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15232 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-29 20:53:00 +00:00
Stephan Aßmus
c63a78aafa now doing without a global dirty region, and it seems it gained a little speed too, should be easier now to make the multi locker work
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15231 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-29 20:35:47 +00:00
Stephan Aßmus
4dd89c6903 * added a multi locker implementation from Ingo Weinhold,
which supports ReadLockWithTimeout()
* commented the code in many more places
* understood the problem of making the read/write locking
  work: While it would be possible for each window to
  remove the processed region from the global dirty region
  in read lock mode (since it is guaranteed not remove
  a region not intersecting with its own visible region),
  multiple window threads can still not do this at the same
  time, since BRegion itself is not threadsafe of course.
* I need to figure out a way for the window threads to be
  able to access and modify all needed data in read only mode,
  I think this means to divide the global dirty region into
  each window again, so that each window thread can simply
  clear its own dirty region instead of excluding it from
  the global region. Yeah, that might work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15230 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-29 19:08:58 +00:00
Axel Dörfler
a9b83b752c Added a bit of documentation to the EventDispatcher.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15229 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-29 17:00:08 +00:00
Axel Dörfler
f89b4c9a23 Have I said input event handling is done?
* didn't realize that mouse events always go to the view under the mouse, not
  only if its the focus window (FFM can really do harm, after all :-)).
* removed a TODO from the list: EventDispatcher::Target is now a public
  class EventTarget, and every ServerWindow has one.
* as a result, EventDispatcher no longer manages targets itself, it
  just maintains a list of them. You no longer set messengers, you
  only set targets.
* customization of the message filters, they no longer inherit from
  BMessageFilter (but EventFilter).
* a message target is no longer set explicetly anywhere, it's only
  changed in the message filters if needed.
* therefore, no more locking mess in the EventDispatcher needed.
* this also made the EventDispatcher::fLastFocus stuff superfluous.
* moved the RootLayer::MouseEventHandler() into the message filter.
* Replaced RootLayer::_ChildAt() with WindowAt().
* WindowLayer now has an idea if it has focus or not, it no longer needs
  to query the RootLayer for this - maybe we should rename "focus" to
  "active", though (as far as layers are concerned).
* the "_view_token" data is now added from the EventDispatcher, not
  the (Window)Layer class anymore.
* removed Layer::MouseWheelChanged() as we currently don't need it
  (if the need arises, we can add it back later again)
* there is still no mouse moved message sent when opening a window
  under the cursor, though...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15228 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-29 16:01:41 +00:00
Axel Dörfler
c7bba5ca04 When it gets a B_ENTERED_VIEW transit in MouseMoved(), it will now use a different
color. In BeOS, a view gets a MouseMoved() with B_ENTERED_VIEW when the window is
opened under the mouse cursor (not yet in Haiku).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15227 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-29 13:32:35 +00:00
Axel Dörfler
17adc30b57 Only compiled under BeOS...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15226 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-29 13:12:27 +00:00
Axel Dörfler
7362a1d7b8 Added a test application for B_AVOID_FOCUS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15225 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-29 13:07:01 +00:00
Rudolf Cornelissen
d9b60a740a finalized docs for release.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15213 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-29 11:57:38 +00:00
Rudolf Cornelissen
898ec61104 finalized docs for release.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15212 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-29 11:56:55 +00:00