History log of /haiku-fatelf/src/servers/app/Window.cpp
Revision Date Author Comments
# 59347b7f 13-Aug-2012 Ryan Leavengood <leavengood@gmail.com>

Reverse the meaning of BWindow fShowLevel to match BView.

This also matches the client_window_info.show_hide_level field used in Deskbar
and other applications.

While doing this, keep fShowLevel fully in sync between BWindow and app_server,
use one message type for both hiding and showing, and make the decision to show
and hide the window in the app_server.

Lastly make minimize behave as described in the Be Book: hidden windows cannot
be minimized, and minimized windows which get hidden become unminimized.


# 96cabf58 12-Aug-2012 Ryan Leavengood <leavengood@gmail.com>

Sync BWindow fShowLevel with the app_server.

Implementing the window_info.show_hide_level in terms of this solves the
problem of minimized windows also being considered hidden, when really they are
just hidden in the app_server.

window_info.show_hide_level is still defined backwards with a comment making
that clear.

Also removed sending fShowLevel in the minimize request since it is now
maintained in the app_server.

Fixes #4127.


# 03b82a62 28-Apr-2012 Rene Gollent <anevilyak@gmail.com>

Fix decorator reload crash.

- SetTopTap() -> SetTopTab().
- When reloading the decor, if the window in question is borderless,
short circuit. Previously, we wouldn't allocate a decorator for such
a window, but would then go through the remaining steps of attempting
to set the focus/top tab, which would obviously crash. Fixes #8500 and
possibly others.
- Add error check that adding tabs to the decorator actually succeeded.


# 0e35d5d2 12-Dec-2011 John Scipione <jscipione@gmail.com>

Change instances of wether in comments to whether. No functional change intended.


# 2ccad1f6 25-Sep-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

* Fix decorator reloading of windows in a stack. When reloading the decorator all tabs have to be added to the decorator, the focus and the top layer tab must be set. The decorator does not know about the window and the window stack, thus the window has to do it itself.
* Add Joseph Groover to the author list.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42768 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fcde9a32 09-Aug-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

When stacking windows, move the new window to the parent position and size. Simplify the part in S&T that took care of it before.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42615 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 747d2bb6 03-Aug-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Ok, ok if we redrawn the complete visible region anyway we don't have to calculate any dirt.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42569 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38a8938d 03-Aug-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Only redraw visible region.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42568 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c141573 02-Aug-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Move flags and look into the tab too. The flags are needed to determine e.g. whether or not the zoom button should be drawn.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42552 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c70bf97c 02-Aug-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Set the top most window look when switching between windows in a stack.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42549 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 817f7d80 02-Aug-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Check if there is still a decorator. Fixes #7894.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42540 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 555ff465 01-Aug-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Check size limit of all stacked windows when resizing. Fixes #7893 thanks to diver (again).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42537 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd545a2a 31-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Set the top layer tab when detaching a window from the stack.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42527 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6ce29ffc 26-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Remove some debug left over.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42503 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b7b6df07 26-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

When closing a window the window can't redraw the dirty region anymore. Mark the region of the remaining window dirty.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42494 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 86b01082 25-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

* Draw the complete decorator off screen and copy it to the front when finished. Stippi please take a look. This fixes some flickering when drawing shifted tabs in stack mode. In stack mode the different tabs sometime repaint each other, thus the decorator has to been drawn double buffered to avoid artefacts.
* Add an option to draw the button directly, i.e. when they are clicked.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42493 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7c5525e8 25-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Only allow windows with a normal thick border to S&T. Fixes #6647.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42492 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 16aa61c4 25-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Fix changing of the window feel and borderless windows.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42491 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 418f391f 24-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Fixes #7796. The decorator add-on is unloaded when not needed anymore. Avoid assigning offscreen windows a window behaviour (which lives in an add-on). When loading another add-on the offscreen window was still pointing to an invalid window behaviour.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42482 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bb2e9b06 24-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Add multi tab support to the default decorator as discussed on the mailing list. Windows can be stacked on top of one another. All windows using the same decorator instance. This makes it easier to draw the stacked tabs and makes it possible to design more fancy looks for stacked windows. This also helps to fix some issues in S&T, e.g. when activating one window in a stacked group all windows have to be activated to ensure that all tabs are on top. This causes some flickering in tracker.

* Each Window has a reference counted WindowStack class which can be shared between stacked Windows. To keep the Decorator separated from Window there is another tab list in the Decorator now. The index of the stacked Window in the window stack is the same as the index of the tab in the Decorator. Properties like title or window focus are managed on a per tab basis now. This mean when you set the title in the Decorator you also have to specify the tab id which is equal to the window position in the stack.

* When drawing the decorator its important that only the top window is doing the drawing. Also the top window drawing engine should be used.
Actually that is only a problem directly after a window is stacked and the other window has still a none empty dirty region. In this case we clear the dirty region of this window and stop the drawing (the top window will draw everything).

* Track if shifting of a tab is still ongoing, i.e. mouse still down.

* The key event filter called the DesktopListener without holding the window write lock. This probably caused #7801 and #7796.

* Commented out assert's in Window::SetScreen and Window::Screen. Add TODO because I'm not sure about the screen access.

This breaks all existing decorators again, sorry guys! Haven't looked into any other then the default decorator (and the SAT decorator). Will not fix the others in the near future so go for it! Since applications should be able to rely on S&T features the other decorator must be able to handle multiple tabs as well. A simple solution would be to draw all title bars in multiple rows. That probably looks quit poorly. Think the better solution would be to draw a tab interface in the title bar, e.g. like in KDE.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42478 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b46615c5 19-May-2011 Stephan Aßmus <superstippi@gmx.de>

Applied patch by Joseph "looncraz" Groover from ticket #7445.
This changes how Decorators are managed and applied. The app_server
no longer scans and maintains the available ones himself, but is
simply asked to load a Decorator add-on from a provided path.
The Decorator scanning is moved into DecorInfo and DecorInfoUtil,
private classes in the InterfaceKit. The bin command 'setdecor'
uses those.
I cleaned up all the coding style violations that I could find,
removed chunks of code which didn't make sense (if you never put
a NULL pointer into a list, you don't need to check for this and
so on) and also cleaned up other passages for improved clarity
and simplicity.
I also tested the functionality and it works fine. Would even be
Ok to include in Alpha 3, IMHO. Thanks for the patch!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41581 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 427788e0 24-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Extended the Desktop's MouseFilter to reset the mouse-down messages' "clicks"
field. It does that when the modifiers, the pressed buttons, or the click
target changes between the clicks, or when the distance between the click
points is >= four pixels.
* Adjusted the Window::MouseDown() and WindowBehavior::MouseDown() interfaces
and implementation accordingly (we now also pass and return click count and
click targets).
* Removed the no longer need multi-click handling from DefaultWindowBehaviour.

Fixes #6841 and #6867.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39623 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 76107eeb 24-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Added ModifiersChanged() hook to Window and [Default]WindowBehavior.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39622 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9ff327de 19-Nov-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

- Make MessageForListener a bit more flexible, passing a fix ServerLink is sometimes not enough and a separate sender and receiver is needed.
- Add communication part to restore and save S&T groups.
- Fix call of GetDecoratorSettings listener hook.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39534 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2248e30f 04-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Fixed broken accept-first-click eating logic I introduced yesterday, sorry!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37893 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0e505c0c 03-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Separate the B_WILL_ACCEPT_FIRST_CLICK window flag from the accept-first-click
desktop setting, following bug #6420.
* Now, only windows with the flag set have to implement their activate behaviour
itself (as Tracker does), the desktop setting no longer has an influence on
this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37885 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b6ba2290 02-Aug-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Introduce a new DecorAddOn class which provide the DecorManager with the needed Decorator, WindowBehaviour and DesktopListener.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37857 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bb86786a 28-Jul-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

- Make _Windows public.
- Reload all decorators when the decorator has changed in the DecorManager.
- Update copyrights.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37801 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 30c31ae2 19-Jul-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Always use the current decorator. This partially fix bug #6334.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37608 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 369b4ff1 15-Jul-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Update copyrights.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37530 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 09301a49 15-Jul-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Fix another TODO and move the caching of the decorator footprint region (the border region) form the Window class into the decorator base class. To do so I make some of the public Decorator methods non virtual and introduce new protected virtual methods instead. The non virtual public methods handle the caching now and calling the protected method afterwards.

This has to be taken into account when fixing the other Decorators!



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37529 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 177ecc46 14-Jul-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Refactoring of the Window class. Move window behaviour into separate WindowBehaviour class.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37524 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2fc6f37e 25-May-2010 Axel Dörfler <axeld@pinc-software.de>

* Window::MouseDown() no longer eats the click if the window modifiers were
pressed even if there is nothing to do. This allows the Deskbar to be moved
with the window modifier keys held, finally, see #6029.
* Removed a superfluous (fDecorator != NULL) from the check to choose between
decorator and window modifier action - _ActionFor() can safely be called with
a NULL decorator, and it just made the logic look wrong (even though no harm
was done).
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36935 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a0b37b6e 11-Mar-2010 Stephan Aßmus <superstippi@gmx.de>

Tried to fix all issues with running a DEBUG build of app_server.
* CopyRegion should not need the HWInterface to be exclusive locked.
* BitmapDrawingInterface does not need to be locked at all, since
it doesn't use a shared HWInterface instance.
* Window and Desktop should lock the HWInterface appropriately
before invoking CopyRegion() on the DrawingEngine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35822 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 90b5a0b2 22-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* Renamed all DEC_* constants to CLICK_*.
* Renamed DEC_MOVETOBACK to CLICK_MOVE_TO_BACK, and DEC_SLIDETAB to
CLICK_SLIDE_TAB.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35259 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ba1d39e4 22-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* Right clicking the resize area now always moves the window behind. This
obviously differentiates from BeOS behaviour, but I think it makes much more
sense this way.
* Simplified DefaultDecorator::Clicked() by eliminating the "clicked" variable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35258 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5b576468 01-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Removed (incorrect) check in ServerWindow::NotifyMinimize() for
B_NOT_MINIMIZABLE; it should still be possible to hide an application
programmatically.
* The decorators now honor this flag, though.
* And the Deskbar overrides BWindow::Minimize() to ignore all minimize requests.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34404 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 85d512ed 30-Oct-2009 Philippe Houdoin <philippe.houdoin@gmail.com>

Revert Stack & Tile patch (r33814) and first fixes done by axel (r33824, r33826)
The stack & tile feature developement & fixes would be done in
branches/features/stack-and-tile branch, until it's ready enough to be merge
into trunk.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33840 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 23e00a25 29-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed millions of coding style violations introduced by the stack & tile
patch. Grmbl.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33824 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ef831a1d 28-Oct-2009 Philippe Houdoin <philippe.houdoin@gmail.com>

Applied Stack & Tile patch by Hong Yul Yang, formely by Christof Lutteroth.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33814 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 926e63c8 22-Oct-2009 Brecht Machiels <brecht@mos6581.org>

* 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


# 5762cbce 12-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed typo.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33552 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 931cd377 07-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a new flag kAcceptKeyboardFocusFlag that allows B_AVOID_FOCUS windows
to still receive keyboard events. This is now used for menu windows (before,
the menu feel alone would trigger that behaviour).
* This also fixes bug #4691, as tool tip windows use the menu feel as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33481 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5a41c9fb 06-Oct-2009 Stephan Aßmus <superstippi@gmx.de>

Sorry, should have tested the patch first. Now it actually works as intended.
I.e. you need to hold down exactly Ctrl+Alt for the server side window
modifiers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33459 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a1d5d234 06-Oct-2009 Stephan Aßmus <superstippi@gmx.de>

Applied part of a patch from Caitlin Shaw (coding style cleaned up!):
* Trigger server side window modifiers only if exactly those modifiers are
pressed.
* Add the new window flags defined in Window.h to what the server considers
valid flags. Otherwise the new flags important to the server (only
B_NO_SERVER_SIDE_WINDOW_MODIFIERS) get filtered out.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33458 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 78ca6157 27-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Changed AS_GET_SCREEN_ID_FROM_WINDOW as well as AS_SCREEN_GET_MODE to no
longer hold the window lock. There is now a lock that guards screen changes
in particular. This fixes the deadlocks seen in apps using BDirectWindow.
* All direct window handling now sits in the Desktop class -
ServerWindow::HandleDirectConnection() is never called from anywhere else
anymore. Furthermore, it's now only called when actually needed.
* Resize/move actions now always send a B_CLIPPING_MODIFIED flag, too.
* When the screen changed, the driver state is supposed to be B_MODE_CHANGED,
not B_SCREEN_CHANGED (which is a message constant).
* Direct windows are no longer suspended too late on screen changes.
* Removed unused members of DirectWindowData, and cleaned it up a bit.
* Made MultiLocker's default, and copy constructors private - I accidently
used them, causing the ASSERT_MULTI_*LOCKED() macros to fail.
* Added Unlock() to AutoWriteLocker as well.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32742 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9a9aa3e0 24-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* The Ctrl-Alt-window modifier patch was pretty broken. Also, I've disabled
window moving for windows without a decorator at all, at least that's what I
would assume they intend (we might want to force them to set B_NOT_MOVABLE,
too, though).
* This also fixes the crashing bug as described in ticket #4314.
+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32649 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f6ad8d5a 23-Aug-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

More encapsulation of directwindow stuff into DirectWindowData.
I changed lot of code (while trying to fix ticket #4311), reverted some old
changes and probably messed up a lot. It's very much a work in progress.
Anyway, DirectWindowStars still work correctly, but Chart (and GLTeapot) do
not. I suspect a race condition between the DirectWindow creation and
the activation of the direct mode on the server, maybe exposed more easily
by the changes in the scheduler.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32625 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fe7f167d 21-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Resolved a TODO and got rid of Desktop::ActiveScreen().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32566 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c8695a6 14-Aug-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

only call HandleDirectConnection() if the window is not hidden. Fixes bug #4234

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32369 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f98bacf6 13-Aug-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Moved HandleDirectConnection From Window to Desktop. This should fix the
spurious off-window drawing of BDirectWindow. At least, it does here.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32312 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6dad3717 13-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Don't let the app_server trigger a content draw if the kWindowScreenFlag is
set. This fixes the white background when starting ParticlesII.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32305 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c6906c28 31-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* In FFM mode, when a window was closed, or the workspace was changed, the
window under the mouse was given focus. This makes using FFM with the keyboard
alone very inconvenient to use, which is why now the window that previously
had focus will regain it instead; as soon as you actually move the mouse, the
focus is changed as usual.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32014 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 97fd0558 28-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

* Fixed bug introduced with recent commits that didn't keep the relative
offset of the mouse when resizing/moving windows when other constraints
restricted the resizing or moving.
* Applied patch by Stephen Deken with changes by myself:
- Windows now snap to the screen edges.
- There is a snapping time window of 1.5 secs during which the window still
snaps to the screen edge after it first snapped. Then there is a pause
during which there is no snapping.
Thanks a lot, Stephen, and sorry it took so long, nice patch!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31841 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6e4ad063 27-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

Improved the anti-accidental-window-nudge feature: Use the activation delay
also in the MouseMoved() hook for a timeout. So window moving begins after
either a timeout of half a second, or after having moved the mouse at least
4 pixels.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31834 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0f8d2b68 27-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

Be a good boy and follow through with the new feature of server side window
shortcuts so that the second mouse button sends windows to the back... :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31827 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e343673a 26-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

* The app_server implements modifiers for performing decorator actions anywhere
inside the window. These are Command + Alt. In X11, it's just Alt, but that
is already used in various Haiku/BeOS apps.
* Introduced new window flag B_NO_SERVER_SIDE_WINDOW_MODIFIERS to disable the
above.
* Made click to front in FFM mode less strict, you can slightly move the mouse
now and still click windows to front.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31785 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 63d557f0 15-Jul-2009 Michael Lotz <mmlr@mlotz.ch>

Fixing random GCC4 warnings. Mostly missing consts, some parentheses, some braces... Should all be harmless and not change anything.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31600 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cc636a35 24-May-2009 Michael Lotz <mmlr@mlotz.ch>

Simplify dirty region handling when copying regions. Basically the full region
is considered dirty and only what we are really able to copy (which excludes all
possible dirty regions) is removed from that again. This is simpler and less
error prone than to remove more than we may copy and then add the old dirty
regions back. Fixes a few region copy related redraw issues most visible in case
of scrolling like non-updated parts when scrolling in Tracker or Terminal as in
bug #3803.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30840 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c4005c4d 09-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

* Some cleanup in the commented out debug code.
* Fixed a problem when scrolling. Basically, the region that could be copied
should be removed from the pending dirty region. Before a region is copied,
the dirty regions are removed from it. So the region at the target offset
can always be considered clean. This fixes the problem in Tracker when
enlarging windows that are already scrolled to the right or bottom. This then
triggers the Tracker window to scroll the pose view in such a way that the
bottom/right stays fixed, but would trigger this exact situation: The bottom
is already pending dirty, but then the clean contents are copied on top of it.
Fixes ticket #1849 and perhaps also #2975.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30068 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5ea31e66 13-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

Cleaned up the dirty region handling in Window::CopyContents()
(the backend of scrolling and BView::CopyBits()). Seems to fix
the dirty entries when opening Tracker windows, and another
problem I've seen when scrolling too fast in Beam.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29495 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 740ea807 31-Jan-2009 Stephan Aßmus <superstippi@gmx.de>

Exclude any dirty regions from scrolling or copybitting. The previous behavior,
which was also the BeOS behavior IIRC, has annoyed me a bit as an application
developer. It wasn't possible to avoid display artifacts, if for example
scrolling a view which needed to be redrawn at the same time. It sounds
strange, but makes perfect sense for the situation I have here.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29101 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0a3f410f 16-Nov-2008 Axel Dörfler <axeld@pinc-software.de>

* 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


# d0283566 14-Nov-2008 Axel Dörfler <axeld@pinc-software.de>

* Added a method Desktop::_LastFocusSubsetWindow() which returns the last
window being the focus window that is a subset of the specified window.
* This is now used to bring the window to front belonging to a floating
or modal window (if on another workspace), ie. Desktop::ActivateWindow()
should now work with modal and floating windows.
* Fixed typo (in Window.cpp).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28649 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f7c84775 06-Nov-2008 Stephan Aßmus <superstippi@gmx.de>

* Don't invalidate anything in offscreen windows. NetPositive is doing
slightly strange redrawing, including scrolling the offscreen view
that it uses in "flicker free" mode (which is the default). Invalidation
does not work in offscreen windows, since the client thread is not running
and certainly won't redraw anything. But that will leave a non-drawable
region on the app_server side of things. Simply don't invalidate in
this case. From what I have seen, redrawing in NetPositive seems to
work fine now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28538 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 85dbe55d 24-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* r28281 accidently added the B_NORMAL_WINDOW_FEEL (0) to the list of special
feels. This caused floating/modal app and subset windows to not work anymore.
* This fixes bug #2914.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28309 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 89b1afd1 22-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* Added a new window feel kPasswordWindowFeel that is above all other feels.
* Changed the password window to use this feel.
* Later, the screen saver itself should use this feel whenever the password
mode is enabled. The password window should then use a modal-app feel, but
this doesn't work yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28281 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0f32f7dd 18-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* Added an ASSERT() and a check to make sure the workspace that Backmost() and
Frontmost() are using is valid.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28228 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 54f92239 08-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* The ServerWindow now memorizes the original BDirectWindow feel when switching
to full screen. Since BDirectWindows can have any feel, this does now
correctly restore it instead of always reverting to B_NORMAL_WINDOW_FEEL.
* This fixes part of bug #2808.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27920 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 139f143c 26-Aug-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fixed warnings. Maybe we should do all the calculations in ints instead of using floats

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27207 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd2509c5 10-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Desktop::_UpdateFloating() and Desktop::_UpdateSubsetWorkspaces() both
assumed that there was only a single window that was responsible for the
workspaces of a floating/subset window. Of course, any number of windows
can make up the workspaces of those. This fixes bug #2506.
* Added a Window::InSubsetWorkspace() method to complement SubsetWorkspaces().
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26371 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 581e6786 09-Jun-2008 Stephan Aßmus <superstippi@gmx.de>

* Change the protocol for sending the affected view tokens during an update
session to also include each view's individual update rect (in screen coords).
Should actually not be mush slower than the old version, and hopefully makes
it possible to have smarter BView::Draw() implementations which should make
more than up for any potential speed loss.
* Removed unused version of View::AddTokensForViewsInRegion().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25879 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f0c3c996 07-Jun-2008 Michael Lotz <mmlr@mlotz.ch>

* Decouple local and user clipping into normal local clipping and a user
clipping region pointer.
* Provide _ScreenClipping() that only includes local and screen clipping but
not user clipping.
* Provide ScreenAndUserClipping() that returns screen clipping if no user
clipping is present, or returns a combined region that is then cached.
* Adapt all places where the former methods are used and decide which one to
use depending on the relevance of user clipping.

User clipping is now ignored for background clearing and when determining
whether or not to call Draw() on a view. This should make Haiku behaviourally
compatible with BeOS (confirmed by the ClippingAndRedraw test app) and should
also fix the Firefox redraw issues. Stephan please review!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25854 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 55112db6 29-May-2008 Axel Dörfler <axeld@pinc-software.de>

* Do not update the internal window state in case sending the message failed.
* This is not perfect, but it makes Tracker catch up and redraw when the next
event is due. This improves the situation in bug #2212.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25708 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 58c42ec9 14-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

No need for the kWorkspacesWindow flag anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24388 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ffac272e 10-Mar-2008 Stephan Aßmus <superstippi@gmx.de>

Used the new mechanism/options in the DrawingEngine with regard to
back to front copies in Window for updates. When in an update session,
any back to front copies are turned off. When the update session ends,
the whole region is copied at once. This has two effects: For once, it
avoids a lot of unnecessary copies (for example, rendering text copied
the background and then the same area for the text again). But even more
effective, it changes the entire drawing of any Haiku app to be completely
flicker free. Provided it happens in the normal Invalidate()/Draw() cycle.
And of course all this only works for double buffering mode, ie VESA.
Potentially, I might have overlooked something, so that this patch could
result in some drawing glitches, but in my testing, I have seen none yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24354 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 582b3d5a 08-Mar-2008 Stephan Aßmus <superstippi@gmx.de>

* When allocating a new Window, check the allocation of the DrawingEngine
instance by introducing Window::InitCheck(), use new (nothrow).
* Window is responsible for the DrawingEngine instance, but forgot to delete
it.
* OffscreenWindow is no longer special, every Window owns a DrawingEngine,
no need to delete it anymore, but since it already deletes the HWInterface
instance, it needs to detach the DrawingEngine from it.
* Use new (nothrow) in OffscreenWindow as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24308 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 437b1927 08-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* Removed severly outdated DebugInfoManager.
* More "layer" cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24305 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 953d895e 07-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* Got rid of the "Layer" part of WindowLayer, ViewLayer, WorkspacesLayer
(now WorkspacesView), OffscreenWindowLayer.
* Renamed ServerScreen.cpp/h to Screen.cpp/h (the class was already called
Screen).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24303 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 59347b7f1bad11b684ce8c6ed594781f5d2eb4e2 13-Aug-2012 Ryan Leavengood <leavengood@gmail.com>

Reverse the meaning of BWindow fShowLevel to match BView.

This also matches the client_window_info.show_hide_level field used in Deskbar
and other applications.

While doing this, keep fShowLevel fully in sync between BWindow and app_server,
use one message type for both hiding and showing, and make the decision to show
and hide the window in the app_server.

Lastly make minimize behave as described in the Be Book: hidden windows cannot
be minimized, and minimized windows which get hidden become unminimized.


# 96cabf581a611e030a1156d9569ca8a11524cb61 12-Aug-2012 Ryan Leavengood <leavengood@gmail.com>

Sync BWindow fShowLevel with the app_server.

Implementing the window_info.show_hide_level in terms of this solves the
problem of minimized windows also being considered hidden, when really they are
just hidden in the app_server.

window_info.show_hide_level is still defined backwards with a comment making
that clear.

Also removed sending fShowLevel in the minimize request since it is now
maintained in the app_server.

Fixes #4127.


# 03b82a629d6358fc6c4ad3b5bb45793fd028a0f2 28-Apr-2012 Rene Gollent <anevilyak@gmail.com>

Fix decorator reload crash.

- SetTopTap() -> SetTopTab().
- When reloading the decor, if the window in question is borderless,
short circuit. Previously, we wouldn't allocate a decorator for such
a window, but would then go through the remaining steps of attempting
to set the focus/top tab, which would obviously crash. Fixes #8500 and
possibly others.
- Add error check that adding tabs to the decorator actually succeeded.


# 0e35d5d2e5ef3d288e056d60ef1b16dc399eaa0c 12-Dec-2011 John Scipione <jscipione@gmail.com>

Change instances of wether in comments to whether. No functional change intended.


# 2ccad1f632c815397f16f7062d97cd02bdede8b8 25-Sep-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

* Fix decorator reloading of windows in a stack. When reloading the decorator all tabs have to be added to the decorator, the focus and the top layer tab must be set. The decorator does not know about the window and the window stack, thus the window has to do it itself.
* Add Joseph Groover to the author list.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42768 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fcde9a3249fb92ca05cbb44b4037b4486025d823 09-Aug-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

When stacking windows, move the new window to the parent position and size. Simplify the part in S&T that took care of it before.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42615 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 747d2bb6dccf2702ad3bc4f35268ed16615a1692 03-Aug-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Ok, ok if we redrawn the complete visible region anyway we don't have to calculate any dirt.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42569 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38a8938d9ff440ee5c68bc54eb815f300de97947 03-Aug-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Only redraw visible region.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42568 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c1415732dcf43dec54a93d20ad15c701dc6996e 02-Aug-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Move flags and look into the tab too. The flags are needed to determine e.g. whether or not the zoom button should be drawn.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42552 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c70bf97cfc99652317b0418f9a53c8791cf695e0 02-Aug-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Set the top most window look when switching between windows in a stack.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42549 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 817f7d80039d667922f9ee05f3d6248932b1fba9 02-Aug-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Check if there is still a decorator. Fixes #7894.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42540 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 555ff46538c86abb0ad150f3c9ef9fc26eae8c21 01-Aug-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Check size limit of all stacked windows when resizing. Fixes #7893 thanks to diver (again).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42537 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd545a2af25e43ea46dfd34a2101f6279ae4a2ac 31-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Set the top layer tab when detaching a window from the stack.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42527 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6ce29ffc9711306bfb44c099fcb1d81ff5d0eae6 26-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Remove some debug left over.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42503 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b7b6df07b845c49a49c4c157dcf306771e066f54 26-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

When closing a window the window can't redraw the dirty region anymore. Mark the region of the remaining window dirty.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42494 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 86b010824cfcf9923573ca68850fd26a71eeb0bc 25-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

* Draw the complete decorator off screen and copy it to the front when finished. Stippi please take a look. This fixes some flickering when drawing shifted tabs in stack mode. In stack mode the different tabs sometime repaint each other, thus the decorator has to been drawn double buffered to avoid artefacts.
* Add an option to draw the button directly, i.e. when they are clicked.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42493 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7c5525e83489cc80600bc31d1a8be774bccd34c0 25-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Only allow windows with a normal thick border to S&T. Fixes #6647.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42492 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 16aa61c46a18969d8fa9b13d04cf1f9cab03b80d 25-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Fix changing of the window feel and borderless windows.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42491 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 418f391fb12d0485e22b522b6c5c62ed4a8034c2 24-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Fixes #7796. The decorator add-on is unloaded when not needed anymore. Avoid assigning offscreen windows a window behaviour (which lives in an add-on). When loading another add-on the offscreen window was still pointing to an invalid window behaviour.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42482 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bb2e9b06acb1783543442464561b7811892ee7e2 24-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Add multi tab support to the default decorator as discussed on the mailing list. Windows can be stacked on top of one another. All windows using the same decorator instance. This makes it easier to draw the stacked tabs and makes it possible to design more fancy looks for stacked windows. This also helps to fix some issues in S&T, e.g. when activating one window in a stacked group all windows have to be activated to ensure that all tabs are on top. This causes some flickering in tracker.

* Each Window has a reference counted WindowStack class which can be shared between stacked Windows. To keep the Decorator separated from Window there is another tab list in the Decorator now. The index of the stacked Window in the window stack is the same as the index of the tab in the Decorator. Properties like title or window focus are managed on a per tab basis now. This mean when you set the title in the Decorator you also have to specify the tab id which is equal to the window position in the stack.

* When drawing the decorator its important that only the top window is doing the drawing. Also the top window drawing engine should be used.
Actually that is only a problem directly after a window is stacked and the other window has still a none empty dirty region. In this case we clear the dirty region of this window and stop the drawing (the top window will draw everything).

* Track if shifting of a tab is still ongoing, i.e. mouse still down.

* The key event filter called the DesktopListener without holding the window write lock. This probably caused #7801 and #7796.

* Commented out assert's in Window::SetScreen and Window::Screen. Add TODO because I'm not sure about the screen access.

This breaks all existing decorators again, sorry guys! Haven't looked into any other then the default decorator (and the SAT decorator). Will not fix the others in the near future so go for it! Since applications should be able to rely on S&T features the other decorator must be able to handle multiple tabs as well. A simple solution would be to draw all title bars in multiple rows. That probably looks quit poorly. Think the better solution would be to draw a tab interface in the title bar, e.g. like in KDE.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42478 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b46615c55ad2c8fe6de54412055a0713da3d610a 19-May-2011 Stephan Aßmus <superstippi@gmx.de>

Applied patch by Joseph "looncraz" Groover from ticket #7445.
This changes how Decorators are managed and applied. The app_server
no longer scans and maintains the available ones himself, but is
simply asked to load a Decorator add-on from a provided path.
The Decorator scanning is moved into DecorInfo and DecorInfoUtil,
private classes in the InterfaceKit. The bin command 'setdecor'
uses those.
I cleaned up all the coding style violations that I could find,
removed chunks of code which didn't make sense (if you never put
a NULL pointer into a list, you don't need to check for this and
so on) and also cleaned up other passages for improved clarity
and simplicity.
I also tested the functionality and it works fine. Would even be
Ok to include in Alpha 3, IMHO. Thanks for the patch!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41581 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 427788e06f65f338595de54e91aa12792741e6d8 24-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Extended the Desktop's MouseFilter to reset the mouse-down messages' "clicks"
field. It does that when the modifiers, the pressed buttons, or the click
target changes between the clicks, or when the distance between the click
points is >= four pixels.
* Adjusted the Window::MouseDown() and WindowBehavior::MouseDown() interfaces
and implementation accordingly (we now also pass and return click count and
click targets).
* Removed the no longer need multi-click handling from DefaultWindowBehaviour.

Fixes #6841 and #6867.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39623 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 76107eeb117de4d4289dcb8942737ff7dc1e998f 24-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Added ModifiersChanged() hook to Window and [Default]WindowBehavior.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39622 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9ff327dea3cf4ab84fa475ada4b073e311794654 19-Nov-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

- Make MessageForListener a bit more flexible, passing a fix ServerLink is sometimes not enough and a separate sender and receiver is needed.
- Add communication part to restore and save S&T groups.
- Fix call of GetDecoratorSettings listener hook.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39534 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2248e30f1195cb2300bdd581d1ae53797810482d 04-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Fixed broken accept-first-click eating logic I introduced yesterday, sorry!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37893 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0e505c0c7bd8bb6a815daee1dbd76dcc563dae9c 03-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Separate the B_WILL_ACCEPT_FIRST_CLICK window flag from the accept-first-click
desktop setting, following bug #6420.
* Now, only windows with the flag set have to implement their activate behaviour
itself (as Tracker does), the desktop setting no longer has an influence on
this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37885 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b6ba2290fc6e584dbb45c4a2e9940b576a47be56 02-Aug-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Introduce a new DecorAddOn class which provide the DecorManager with the needed Decorator, WindowBehaviour and DesktopListener.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37857 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bb86786a1bac06ffbb4baa03c4a9311283c835a2 28-Jul-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

- Make _Windows public.
- Reload all decorators when the decorator has changed in the DecorManager.
- Update copyrights.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37801 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 30c31ae28a5c00d6ff25db9e8960b37a1ba76cda 19-Jul-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Always use the current decorator. This partially fix bug #6334.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37608 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 369b4ff1e3189dbb2a9f45e285020694f2372fc2 15-Jul-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Update copyrights.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37530 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 09301a495904ea4032a1c4584630918db737b3b2 15-Jul-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Fix another TODO and move the caching of the decorator footprint region (the border region) form the Window class into the decorator base class. To do so I make some of the public Decorator methods non virtual and introduce new protected virtual methods instead. The non virtual public methods handle the caching now and calling the protected method afterwards.

This has to be taken into account when fixing the other Decorators!



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37529 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 177ecc46b6e7dc8b210dc09b42fc0891b91249aa 14-Jul-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Refactoring of the Window class. Move window behaviour into separate WindowBehaviour class.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37524 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2fc6f37e8893705bddf0979f0e3afd7143bbad7c 25-May-2010 Axel Dörfler <axeld@pinc-software.de>

* Window::MouseDown() no longer eats the click if the window modifiers were
pressed even if there is nothing to do. This allows the Deskbar to be moved
with the window modifier keys held, finally, see #6029.
* Removed a superfluous (fDecorator != NULL) from the check to choose between
decorator and window modifier action - _ActionFor() can safely be called with
a NULL decorator, and it just made the logic look wrong (even though no harm
was done).
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36935 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a0b37b6e3852e63bd2746468411ca7827c900c25 11-Mar-2010 Stephan Aßmus <superstippi@gmx.de>

Tried to fix all issues with running a DEBUG build of app_server.
* CopyRegion should not need the HWInterface to be exclusive locked.
* BitmapDrawingInterface does not need to be locked at all, since
it doesn't use a shared HWInterface instance.
* Window and Desktop should lock the HWInterface appropriately
before invoking CopyRegion() on the DrawingEngine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35822 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 90b5a0b2619ef5014fb7642b28adcdd7373b2a30 22-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* Renamed all DEC_* constants to CLICK_*.
* Renamed DEC_MOVETOBACK to CLICK_MOVE_TO_BACK, and DEC_SLIDETAB to
CLICK_SLIDE_TAB.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35259 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ba1d39e48fc2dcd67a9b7e0942dd238e2f05c0bf 22-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* Right clicking the resize area now always moves the window behind. This
obviously differentiates from BeOS behaviour, but I think it makes much more
sense this way.
* Simplified DefaultDecorator::Clicked() by eliminating the "clicked" variable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35258 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5b576468d3f483cb15a5408ec955b60e5dcbfa84 01-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Removed (incorrect) check in ServerWindow::NotifyMinimize() for
B_NOT_MINIMIZABLE; it should still be possible to hide an application
programmatically.
* The decorators now honor this flag, though.
* And the Deskbar overrides BWindow::Minimize() to ignore all minimize requests.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34404 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 85d512ed6583c516ce8d1e5999aabbb18e53a979 30-Oct-2009 Philippe Houdoin <philippe.houdoin@gmail.com>

Revert Stack & Tile patch (r33814) and first fixes done by axel (r33824, r33826)
The stack & tile feature developement & fixes would be done in
branches/features/stack-and-tile branch, until it's ready enough to be merge
into trunk.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33840 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 23e00a25e2d8ba0c83be28d548c13e2bdfcbd5d7 29-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed millions of coding style violations introduced by the stack & tile
patch. Grmbl.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33824 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ef831a1dc393b2008b35fc46c028d3466ce7634f 28-Oct-2009 Philippe Houdoin <philippe.houdoin@gmail.com>

Applied Stack & Tile patch by Hong Yul Yang, formely by Christof Lutteroth.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33814 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 926e63c8851f8e1d085981e69ef03f8e9cda1e65 22-Oct-2009 Brecht Machiels <brecht@mos6581.org>

* 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


# 5762cbce567f204f4d0f8c932e53b220e0ac3872 12-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed typo.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33552 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 931cd377aade563781849d3e6f91a9b635cd6753 07-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a new flag kAcceptKeyboardFocusFlag that allows B_AVOID_FOCUS windows
to still receive keyboard events. This is now used for menu windows (before,
the menu feel alone would trigger that behaviour).
* This also fixes bug #4691, as tool tip windows use the menu feel as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33481 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5a41c9fb1766306f310801959ca0f4b1e5b676c4 06-Oct-2009 Stephan Aßmus <superstippi@gmx.de>

Sorry, should have tested the patch first. Now it actually works as intended.
I.e. you need to hold down exactly Ctrl+Alt for the server side window
modifiers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33459 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a1d5d23476a2abcca21aa703ae39a45819c382bc 06-Oct-2009 Stephan Aßmus <superstippi@gmx.de>

Applied part of a patch from Caitlin Shaw (coding style cleaned up!):
* Trigger server side window modifiers only if exactly those modifiers are
pressed.
* Add the new window flags defined in Window.h to what the server considers
valid flags. Otherwise the new flags important to the server (only
B_NO_SERVER_SIDE_WINDOW_MODIFIERS) get filtered out.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33458 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 78ca6157b696f676eaa004e60d7d055f186df204 27-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Changed AS_GET_SCREEN_ID_FROM_WINDOW as well as AS_SCREEN_GET_MODE to no
longer hold the window lock. There is now a lock that guards screen changes
in particular. This fixes the deadlocks seen in apps using BDirectWindow.
* All direct window handling now sits in the Desktop class -
ServerWindow::HandleDirectConnection() is never called from anywhere else
anymore. Furthermore, it's now only called when actually needed.
* Resize/move actions now always send a B_CLIPPING_MODIFIED flag, too.
* When the screen changed, the driver state is supposed to be B_MODE_CHANGED,
not B_SCREEN_CHANGED (which is a message constant).
* Direct windows are no longer suspended too late on screen changes.
* Removed unused members of DirectWindowData, and cleaned it up a bit.
* Made MultiLocker's default, and copy constructors private - I accidently
used them, causing the ASSERT_MULTI_*LOCKED() macros to fail.
* Added Unlock() to AutoWriteLocker as well.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32742 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9a9aa3e02183f53680a0e5282baee8094be9e9df 24-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* The Ctrl-Alt-window modifier patch was pretty broken. Also, I've disabled
window moving for windows without a decorator at all, at least that's what I
would assume they intend (we might want to force them to set B_NOT_MOVABLE,
too, though).
* This also fixes the crashing bug as described in ticket #4314.
+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32649 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f6ad8d5abb30249911c13e17eb1be3f731c86ca3 23-Aug-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

More encapsulation of directwindow stuff into DirectWindowData.
I changed lot of code (while trying to fix ticket #4311), reverted some old
changes and probably messed up a lot. It's very much a work in progress.
Anyway, DirectWindowStars still work correctly, but Chart (and GLTeapot) do
not. I suspect a race condition between the DirectWindow creation and
the activation of the direct mode on the server, maybe exposed more easily
by the changes in the scheduler.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32625 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fe7f167df18f61d4974900e282f9f8c5720e36cb 21-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Resolved a TODO and got rid of Desktop::ActiveScreen().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32566 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c8695a627802dde31f0b53bc2821cb33c66f2d6 14-Aug-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

only call HandleDirectConnection() if the window is not hidden. Fixes bug #4234

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32369 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f98bacf6ca52679ea11700bf43681391c17612cf 13-Aug-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Moved HandleDirectConnection From Window to Desktop. This should fix the
spurious off-window drawing of BDirectWindow. At least, it does here.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32312 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6dad3717d5c27deebd59d685d7646297ba1786e3 13-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Don't let the app_server trigger a content draw if the kWindowScreenFlag is
set. This fixes the white background when starting ParticlesII.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32305 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c6906c2832dfea48b42e8443c07120468a71a1b9 31-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* In FFM mode, when a window was closed, or the workspace was changed, the
window under the mouse was given focus. This makes using FFM with the keyboard
alone very inconvenient to use, which is why now the window that previously
had focus will regain it instead; as soon as you actually move the mouse, the
focus is changed as usual.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32014 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 97fd0558dec7d893956b1337dbc91799df87cb41 28-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

* Fixed bug introduced with recent commits that didn't keep the relative
offset of the mouse when resizing/moving windows when other constraints
restricted the resizing or moving.
* Applied patch by Stephen Deken with changes by myself:
- Windows now snap to the screen edges.
- There is a snapping time window of 1.5 secs during which the window still
snaps to the screen edge after it first snapped. Then there is a pause
during which there is no snapping.
Thanks a lot, Stephen, and sorry it took so long, nice patch!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31841 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6e4ad063022b391720a385d03d439f0556d3beae 27-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

Improved the anti-accidental-window-nudge feature: Use the activation delay
also in the MouseMoved() hook for a timeout. So window moving begins after
either a timeout of half a second, or after having moved the mouse at least
4 pixels.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31834 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0f8d2b68cf3e80b1609744bcf83094cfa392450c 27-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

Be a good boy and follow through with the new feature of server side window
shortcuts so that the second mouse button sends windows to the back... :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31827 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e343673a0b6b93a49c03164157af838c5758e308 26-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

* The app_server implements modifiers for performing decorator actions anywhere
inside the window. These are Command + Alt. In X11, it's just Alt, but that
is already used in various Haiku/BeOS apps.
* Introduced new window flag B_NO_SERVER_SIDE_WINDOW_MODIFIERS to disable the
above.
* Made click to front in FFM mode less strict, you can slightly move the mouse
now and still click windows to front.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31785 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 63d557f06f41c0aef30f8a0fcc5b8d2c47981b33 15-Jul-2009 Michael Lotz <mmlr@mlotz.ch>

Fixing random GCC4 warnings. Mostly missing consts, some parentheses, some braces... Should all be harmless and not change anything.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31600 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cc636a35cb540468d8f77e52c61a559cd893cd66 24-May-2009 Michael Lotz <mmlr@mlotz.ch>

Simplify dirty region handling when copying regions. Basically the full region
is considered dirty and only what we are really able to copy (which excludes all
possible dirty regions) is removed from that again. This is simpler and less
error prone than to remove more than we may copy and then add the old dirty
regions back. Fixes a few region copy related redraw issues most visible in case
of scrolling like non-updated parts when scrolling in Tracker or Terminal as in
bug #3803.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30840 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c4005c4d29daab8c89b8f5125c7293ab7250529c 09-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

* Some cleanup in the commented out debug code.
* Fixed a problem when scrolling. Basically, the region that could be copied
should be removed from the pending dirty region. Before a region is copied,
the dirty regions are removed from it. So the region at the target offset
can always be considered clean. This fixes the problem in Tracker when
enlarging windows that are already scrolled to the right or bottom. This then
triggers the Tracker window to scroll the pose view in such a way that the
bottom/right stays fixed, but would trigger this exact situation: The bottom
is already pending dirty, but then the clean contents are copied on top of it.
Fixes ticket #1849 and perhaps also #2975.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30068 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5ea31e66f763ce2063b8c66f70119e6bb9ec3e30 13-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

Cleaned up the dirty region handling in Window::CopyContents()
(the backend of scrolling and BView::CopyBits()). Seems to fix
the dirty entries when opening Tracker windows, and another
problem I've seen when scrolling too fast in Beam.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29495 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 740ea80754c88a5026064846bf7df48971e56fac 31-Jan-2009 Stephan Aßmus <superstippi@gmx.de>

Exclude any dirty regions from scrolling or copybitting. The previous behavior,
which was also the BeOS behavior IIRC, has annoyed me a bit as an application
developer. It wasn't possible to avoid display artifacts, if for example
scrolling a view which needed to be redrawn at the same time. It sounds
strange, but makes perfect sense for the situation I have here.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29101 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0a3f410f3040ce58777d262de98229a054e43f10 16-Nov-2008 Axel Dörfler <axeld@pinc-software.de>

* 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


# d02835660f6e033fa7e492ba5854448a16bb8945 14-Nov-2008 Axel Dörfler <axeld@pinc-software.de>

* Added a method Desktop::_LastFocusSubsetWindow() which returns the last
window being the focus window that is a subset of the specified window.
* This is now used to bring the window to front belonging to a floating
or modal window (if on another workspace), ie. Desktop::ActivateWindow()
should now work with modal and floating windows.
* Fixed typo (in Window.cpp).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28649 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f7c8477593c144bfdfe9859b4df093b0388c6faf 06-Nov-2008 Stephan Aßmus <superstippi@gmx.de>

* Don't invalidate anything in offscreen windows. NetPositive is doing
slightly strange redrawing, including scrolling the offscreen view
that it uses in "flicker free" mode (which is the default). Invalidation
does not work in offscreen windows, since the client thread is not running
and certainly won't redraw anything. But that will leave a non-drawable
region on the app_server side of things. Simply don't invalidate in
this case. From what I have seen, redrawing in NetPositive seems to
work fine now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28538 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 85dbe55d9b536c77d1510731f1ef3f5d6dd2d5cd 24-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* r28281 accidently added the B_NORMAL_WINDOW_FEEL (0) to the list of special
feels. This caused floating/modal app and subset windows to not work anymore.
* This fixes bug #2914.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28309 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 89b1afd16c7fc6e32462a2c4fb4ce43cfc50ce6a 22-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* Added a new window feel kPasswordWindowFeel that is above all other feels.
* Changed the password window to use this feel.
* Later, the screen saver itself should use this feel whenever the password
mode is enabled. The password window should then use a modal-app feel, but
this doesn't work yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28281 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0f32f7ddeb736ab5aedd50b1ef2f83d9950d8a0e 18-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* Added an ASSERT() and a check to make sure the workspace that Backmost() and
Frontmost() are using is valid.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28228 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 54f92239a2cca528b78c0aa1b457d0e63fb5ca50 08-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* The ServerWindow now memorizes the original BDirectWindow feel when switching
to full screen. Since BDirectWindows can have any feel, this does now
correctly restore it instead of always reverting to B_NORMAL_WINDOW_FEEL.
* This fixes part of bug #2808.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27920 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 139f143c62592ff801d6b8d35d465e9666f84a2f 26-Aug-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fixed warnings. Maybe we should do all the calculations in ints instead of using floats

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27207 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd2509c549c5aa5a456524754cddfb8eb0e4f888 10-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Desktop::_UpdateFloating() and Desktop::_UpdateSubsetWorkspaces() both
assumed that there was only a single window that was responsible for the
workspaces of a floating/subset window. Of course, any number of windows
can make up the workspaces of those. This fixes bug #2506.
* Added a Window::InSubsetWorkspace() method to complement SubsetWorkspaces().
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26371 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 581e67867c88e4dae51de5c30839eabd303cc0a9 09-Jun-2008 Stephan Aßmus <superstippi@gmx.de>

* Change the protocol for sending the affected view tokens during an update
session to also include each view's individual update rect (in screen coords).
Should actually not be mush slower than the old version, and hopefully makes
it possible to have smarter BView::Draw() implementations which should make
more than up for any potential speed loss.
* Removed unused version of View::AddTokensForViewsInRegion().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25879 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f0c3c996cd92350f083210e5cc0d161abbbc3aa1 07-Jun-2008 Michael Lotz <mmlr@mlotz.ch>

* Decouple local and user clipping into normal local clipping and a user
clipping region pointer.
* Provide _ScreenClipping() that only includes local and screen clipping but
not user clipping.
* Provide ScreenAndUserClipping() that returns screen clipping if no user
clipping is present, or returns a combined region that is then cached.
* Adapt all places where the former methods are used and decide which one to
use depending on the relevance of user clipping.

User clipping is now ignored for background clearing and when determining
whether or not to call Draw() on a view. This should make Haiku behaviourally
compatible with BeOS (confirmed by the ClippingAndRedraw test app) and should
also fix the Firefox redraw issues. Stephan please review!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25854 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 55112db6ea5172cfb854ce575f905689cda0a2ea 29-May-2008 Axel Dörfler <axeld@pinc-software.de>

* Do not update the internal window state in case sending the message failed.
* This is not perfect, but it makes Tracker catch up and redraw when the next
event is due. This improves the situation in bug #2212.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25708 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 58c42ec9de3dac4b180baaea018e0849f81c6f64 14-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

No need for the kWorkspacesWindow flag anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24388 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ffac272e35477046672497199d86c09ec2053d0e 10-Mar-2008 Stephan Aßmus <superstippi@gmx.de>

Used the new mechanism/options in the DrawingEngine with regard to
back to front copies in Window for updates. When in an update session,
any back to front copies are turned off. When the update session ends,
the whole region is copied at once. This has two effects: For once, it
avoids a lot of unnecessary copies (for example, rendering text copied
the background and then the same area for the text again). But even more
effective, it changes the entire drawing of any Haiku app to be completely
flicker free. Provided it happens in the normal Invalidate()/Draw() cycle.
And of course all this only works for double buffering mode, ie VESA.
Potentially, I might have overlooked something, so that this patch could
result in some drawing glitches, but in my testing, I have seen none yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24354 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 582b3d5a72633f7d6fa55e913fd07f61a9eb1744 08-Mar-2008 Stephan Aßmus <superstippi@gmx.de>

* When allocating a new Window, check the allocation of the DrawingEngine
instance by introducing Window::InitCheck(), use new (nothrow).
* Window is responsible for the DrawingEngine instance, but forgot to delete
it.
* OffscreenWindow is no longer special, every Window owns a DrawingEngine,
no need to delete it anymore, but since it already deletes the HWInterface
instance, it needs to detach the DrawingEngine from it.
* Use new (nothrow) in OffscreenWindow as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24308 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 437b19277feacd48292ca9ec814a38da17e4eb89 08-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* Removed severly outdated DebugInfoManager.
* More "layer" cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24305 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 953d895e020ece5d50cfc2e76d9f370ceb5c45e7 07-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* Got rid of the "Layer" part of WindowLayer, ViewLayer, WorkspacesLayer
(now WorkspacesView), OffscreenWindowLayer.
* Renamed ServerScreen.cpp/h to Screen.cpp/h (the class was already called
Screen).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24303 a95241bf-73f2-0310-859d-f6bbb57e9c96