History log of /haiku/src/servers/app/Window.h
Revision Date Author Comments
# b5ba4bad 12-Feb-2023 X512 <danger_mail@list.ru>

app_server: clear background immediately on expose

Reduce stamping artifacts when application slowly responds to redraw requests.

This fixes and reintroduces logic previously removed in hrev53711.
Previous logic was incorrect as it didn't take the possibility of multiple
invalidations of different kinds (expose, update request) into account.
Now separate update and expose regions are maintained and only expose region
is cleared immediately.

Change-Id: I0fd98cb1b45ccec285154e8c0d8e3a1400d156d7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6067
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 773d5303 19-Jul-2018 Tri-Edge AI <triedgeai@gmail.com>

app_server: Implement B_OUTLINE_RESIZE

- Allows applications to be resized without the window contents resizing with the window frame.
- Due to the nature of out-of-tree decorators using private APIs, this will require all pre-existing decorators to be rebuilt
- Newer decorators won't work on older versions of Haiku...
- Also has some formatting with license headers.
- Fixes #2724

Change-Id: Id0b45e7bbc0b636e6dffbd396eb584bf348b5296
Reviewed-on: https://review.haiku-os.org/c/haiku/+/344
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jacob Secunda <secundaja@gmail.com>


# d99d8dbd 27-Aug-2020 X512 <danger_mail@list.ru>

app_server memory management: use ObjectDeleter to mark ownership

Make object ownership explicit by use of ObjectDeleter where possible.

Change-Id: I499a00aa3390d1510ae284419e73faffa5166430
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2695
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>


# 7f9368ca 09-Dec-2015 looncraz <looncraz@looncraz.net>

Set*UIColor, etc.

The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.

BView gains:

HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()

BWindow gains a simple helper method:
IsOffscreenWindow()

BMessage gains:

AddColor()
FindColor()
GetColor()
HasColor() * allegedly this API is deprecated, but I implemented it anyway
ReplaceColor()
SetColor()

Previous private ColorTools methods are made public and moved into GraphicsDefs:

mix_color, blend_color, disable_color

These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.

In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR

These changes are documented in their proper user documentation files.

In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.

On the app_server side, the following has changed:

Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules. A single thread is used to service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.

Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed. This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.

In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message
to each BWindow. This is done to improve performance over having the app_server
independently informing each window.

Decorator changes are live now, which required some reworking.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>


# 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.


# 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


# 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


# 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


# 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


# 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


# 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


# 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


# 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


# ea5c7202 05-Jan-2009 Axel Dörfler <axeld@pinc-software.de>

* If a window was hidden during resize/movement, it would still be in resizing
or moving mode when it was shown again. Added a test app HideAndShow which let
you easily reproduce the faulty behaviour (with a previous version of the
app_server, that is).
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28847 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


# 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


# 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


# 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.


# 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


# 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


# 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


# 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


# 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


# 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


# 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


# 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


# ea5c7202cb93f38844d60fa951e9a17ddb9c5e08 05-Jan-2009 Axel Dörfler <axeld@pinc-software.de>

* If a window was hidden during resize/movement, it would still be in resizing
or moving mode when it was shown again. Added a test app HideAndShow which let
you easily reproduce the faulty behaviour (with a previous version of the
app_server, that is).
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28847 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


# 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


# 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