Commit Graph

29 Commits

Author SHA1 Message Date
Stephan Aßmus
ce8ae4d8c2 _TriggerContentRedraw is now given the dirty region, so ProcessDirtyRegion does not have to be called for triggering window local redraws
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 21:16:23 +00:00
Axel Dörfler
58290b7b37 WindowLayer::ProcessDirtyRegions() no longer deadlock in case it can't send
the AS_REDRAW message.
The AS_REDRAW message is now only used as a notifier - it's arrival is not
critical anymore, IOW it's simply dropped when the queue is full.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-12 13:14:21 +00:00
Axel Dörfler
61fed21b04 Renamed Write[Un]lockWindows() to [Un]lockAllWindows(), and Read[Un]lockWindows() to
[Un]lockSingleWindow().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-12 10:41:31 +00:00
Axel Dörfler
bff84e78b7 This enables BDirectWindow support again.
It also fixed a bug in the old code - the handshake semaphores were created
acquirable, causing the BDirectWindow::DirectDaemonFunc() to call DirectConnected()
with an uninitialized buffer and way too early - this probably didn't show up
before since it called it before the BDirectWindow constructor ran through,
so that DirectConnected() would still point to the BDirectWindow version, and
not to the implemented one of its subclass...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15505 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-11 21:46:35 +00:00
Stephan Aßmus
f3faa3c29d * renamed _MarkContentDirty() to _TransferToUpdateSession()
to avoid any confusion with MarkContentDirty()
* hopyfully fixed all drawing defects that could be
  observed with CopyBits()ing and ScrollTo()ing, the fix
  is definitely valid, and I cannot see any more problems
  in Tracker either... hopefully this is it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15458 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 08:05:25 +00:00
Axel Dörfler
0b4b0f97ba Although it's not that clean, mouse clicks are now going through to the
WorkspacesLayer again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15452 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-09 17:25:32 +00:00
Axel Dörfler
9d34a4b6d7 * No longer activates a window on first click if B_WILL_ACCEPT_FIRST_CLICK is set.
* minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15449 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-09 15:40:30 +00:00
Axel Dörfler
159fdf2038 * added a fOriginalFlags that contains the unaltered flags as set by the client
* when changing feel, the original flags are now restored.
* added B_SAME_POSITION_IN_ALL_WORKSPACES to valid flags, so that they can be
  set by the user.
* fixed masking out invalid flags (actually all but the valid flags were kept...)
* everytime B_SAME_POSITION_IN_ALL_WORKSPACES can be set (either in SetFlags()
  or in SetFeel() the position is propagated to all window lists.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15441 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-09 14:06:30 +00:00
Axel Dörfler
34227d2c34 A couple of changes related to modal and floating windows:
* Desktop::SetWindowFeel() is now working, but doesn't respect the window
  position yet (ie. floating windows would have to be moved to front).
* WindowLayer::Workspaces() now always reflects exactly the lists it's in
  (at least after Desktop::AddWindow() has been called). WindowList::AddWindow()
  and RemoveWindow() now update this flag to be correct at all times.
* Fixed Desktop::_ChangeWindowWorkspaces() to not set the current workspace
  for windows that are not on the current workspace, and vice versa.
  It also would hide windows that were already hidden, and tried to show
  windows that actually were hidden (did no other harm than triggering
  a rebuild of the global clipping).
* Floating windows now work as expected.
* Desktop::SetFocusWindow() won't give a window focus that has a modal.
* Renamed OnWorkspace() to InWorkspace().
* ServerApp::InWorkspace() now works correctly, added ServerApp::Workspaces()
  as well.
* WindowLayer::SubsetWorkspaces() returns the workspaces mask this modal or
  floating window should be in.
* New window flag B_SAME_POSITION_IN_ALL_WORKSPACES should work as well.
* Floating and modal windows now have always set this flag.
* Added a WindowList::HasWindow() method.
* Desktop windows (windows with the desktop feel) can now have focus again
  (I accidently broke that before).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15434 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-09 13:17:43 +00:00
Stefano Ceccherini
78d0941945 small change, still commented out, though
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15430 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-09 09:10:34 +00:00
Stephan Aßmus
939fb4077c fix scrolling of BViews that rely on app_server painting the background, remove a forgotten debug output in ViewLayer, reimplemented setting the window title during runtime, fix Decorator redraw on pressing buttons - though I was lazy on that one... it works, but as the TODOs say, it would be better integrated directly in the Decorator class than being handled by WindowLayer
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15429 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-08 22:15:12 +00:00
Axel Dörfler
e83820ed57 Merged app_server_new_clipping branch changes r15290 to 15418 back into trunk.
Also fixed Jamfile for the test environment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15419 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-08 12:41:19 +00:00
Axel Dörfler
c072e9f1f5 * BWindow::AddToSubset()/RemoveFromSubset() no longer send their team ID; this
is known by the server, anyway.
* B_MODAL_SUBSET_WINDOW_FEEL now also works as expected.
* Renamed AS_REM_FROM_SUBSET to AS_REMOVE_FROM_SUBSET.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-02 16:07:02 +00:00
Axel Dörfler
b2d24b66da * B_MODAL_APP_WINDOW_FEEL windows now also work correctly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15284 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-02 15:48:21 +00:00
Axel Dörfler
4c0269b979 * WindowLayer::OnWorkspace() should now work correctly for all window feels.
* introduced ServerApp::OnWorkspace().
* moved AS_CREATE_[OFFSCREEN_]WINDOW into its own method, ServerApp::_CreateWindow().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15283 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-02 15:42:28 +00:00
Axel Dörfler
48ccf5abef Some work to get modal/floating windows back:
* B_{FLOATING|MODAL}_ALL_WINDOW_FEEL now works as expected
* reintroduced the concepts of subsets of modal/floating windows - does only
  work correctly for subset "all" window feels.
* RootLayer::_SetFront() now deals correctly with modal windows
* renamed RootLayer *WindowLayer() methods to *Window()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15282 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-02 15:06:14 +00:00
Axel Dörfler
fc21e33e46 * B_NOT_H_RESIZABLE/B_NOT_V_RESIZABLE are now correctly supported by the decorators.
* Introduced methods WindowLayer::IsModal() and IsFloating().
* Invalid flags for the current feel are now filtered out, like B_AVOID_FOCUS for
  modal windows.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15280 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-02 10:35:01 +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
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
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
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
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
27adb96962 Massive RootLayer & Workspace tearing:
* workspace switch and subset windows functionality temporarily removed
  (away with that mess!).
* no more RevealWMState() - we now have methods like ActivateWindow()
  and SendWindowBehind() that do all the work - just a little cleaner
  and with less overhead.
* Workspace is now a pretty passive class - it only stores configurations
  of the windows and screens.
* added an evil work-around for a locking problem (in RootLayer::_SetFocus()).
* I'll plan to move pretty much all of the remaining root layer functionality
  to Desktop - so that the all regions lock is only held in case clipping
  regions are affected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15207 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-28 23:36:59 +00:00
Axel Dörfler
485b948731 Removed "Active" stuff from Workspaces state.
As a side effect, the desktop is now clickable again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-26 20:22:30 +00:00
Axel Dörfler
14e1abfe7d Made Layer::_AllRedraw() virtual so that it doesn't need this ugly hack to
send _UPDATE_ messages (WindowLayer now overrides that method).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15129 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 17:54:14 +00:00
Axel Dörfler
4b813bf267 Renamed WinBorder to WindowLayer, and OffscreenWinBorder to OffscreenWindowLayer.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15128 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 17:45:26 +00:00