History log of /haiku-fatelf/src/kits/interface/Window.cpp
Revision Date Author Comments
# a0e655bf 03-Jan-2013 Hamish Morrison <hamishm53@gmail.com>

Fix BWindow::DecoratorFrame for top-titled windows.

Also take into account the border width for the edge with the title.
Fixes #8614.


# 0619f34b 04-Nov-2012 Oliver Tappe <zooey@hirschkaefer.de>

Add BWindow::HasShortcut()


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


# 9be774b5 30-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Compilation and 64-bit fixes to libbe.so sources.

Fixed the usual issues - printf format strings, uint32 instead of
addr_t, etc. One thing that isn't so nice is several places where
BList is used to store (u)int32, these require a double cast to addr_t
then void* to silence a warning on x86_64.


# 3cee15aa 28-Mar-2012 John Scipione <jscipione@gmail.com>

Keymap changes from recent activity. No AltGr yet.

Below is a mostly complete summary of the changes in this commit.

* Set the DeadKeys for the US-International Keymap to use the Option map.
* Rename American keymap to US
* Update the US, US-International, and United-Kingdom keymaps to take
out unneeded spaces in the option layer. Also updated the dead keys
and some other keys on the US-International keyboard to use UTF-8
characters rather than there ASCII equivalents when different.
* Make the Option key fall-through when there is no mapping in the Option
table. Option is for special characters, if none, print the regular one.
This is mostly meant for the US keymap which has an empty option map. But
also so that you don't have to repeat the normal, shift, and caps maps in
the option map needlessly. Although the keymaps are still not empty in
some cases that it could be like numpad keys and space.
* Update the /bin/keymap app to use fputs() instead of printf() when there
is no actual formatting taking place. I've gotten into trouble for doing
this before and it is faster to not process the string unnecessarily.
* Also several 80-char limit style fixes and updated comments.
* In Keymap class Reorder the modifier keys to match the keymap files.
Put B_CONTROL_KEY check above B_OPTION_KEY. Neither change has any effect,
they are purely aesthetic.
* Update DumpKeymap() method to use the abbreviated modifier letters so it
will fit in your 80-char wide terminal.
* Tiny style fix in InputServer
* 80-char limit style fix in BWindow and add a comment that the shortcut
gets eaten in the case of Cmd+Q
* Implement IndexForModifier() in KeyboardLayout, although I am not using it.
* Take Caps Lock out of the Modifier keys window because I couldn't get
it to work the way I wanted it to.
* Move key roles to the left column, and the key label on the left. Add column
header labels. Thanks Rimas!
* Add validation and improve marking menu options. Add a 'Disabled' option
to control, option, and command menus to disable the key. Make the key
role text grey if the key roles is disabled. Validation ensures that you
cannot repeat the same key twice in the Modifier keys window since that
won't work. You can't define 2 sets of option keys even if you really want
to. You can disable your control, option, and command keys if you
want, but that is not recommended.
* Rename kUpdateModifiers to kUpdateModifierKeys message to differetiate
it from kUpdateModifier.
* Add shift key to Modifier keys window, use the stop icon instead of the
warning icon to indicate conflicts.
* Allow the Layout system to control the size of the Modifier keys window
again, set the width's of the key role lables to the widest, set the width
of the menu fields to take up the rest of the space minus room for the
conflict views. I didn't like it that the Modifier keys window would change
size based on what options you had selected in the menu fields. Now it
doesn't, but, the layout system still makes it all fit.


# 958ac01d 21-Jan-2012 czeidler <haiku@clemens-zeidler.de>

Reconnect window and recreate all views.


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

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


# 221f5018 11-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Revert part of r43166 that was included accidentally. This resulted in
incorrect behavior while processing certain kinds of messages, and
consequently deadlocks in some apps. Fixes #8101.



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


# 85c30aec 03-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Remove extraneous code with respect to telling a menu to close which was
breaking various cases where menus coexisted in a window with a view which
was using event masks:
- If one invoked the menu via, e.g. a BMenuField, and then tried to choose
an item on it, the mouse down would get captured, the menu would be
closed, and the mouse event would be thrown away without ever reaching
the event mask view.

- Furthermore, since the menu was told to terminate early, it would decide
that the user hadn't actually chosen that item (the escape key case),
and never actually invoke it.

Fixes the menu fields in the mouse preflet being broken.



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


# 14ac1ee9 31-Oct-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Tweak the notification window again :
* Spacing of the bprogressbar is now 8pixels on each size
* Remove the useless window tab for now

Also fix DecoratorFrame() again as BORDERED_WINDOW didn't work with it either.


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


# ee298c8b 06-Aug-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Fix DecoratorFrame() for kLeftTitledWindowLook windows
* Use it in notification window for better positionning.
Thanks augiedoggie for reporting the problem !


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


# 77f593de 04-Aug-2011 Jérôme Duval <korli@users.berlios.de>

Patch from X512 (ticket #7408): Don't notify input server of focus change if window is not active.


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


# b0b4ce7e 03-Aug-2011 Jérôme Duval <korli@users.berlios.de>

Patch from X512 (#7408): only send input method aware messages for active windows


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


# 48ae3e38 27-May-2011 Axel Dörfler <axeld@pinc-software.de>

* Followed Ingo's suggestion, and added a BWindow::Layout() method.
* Changed ShowImage to use that function.
+alpha in case Ingo gives his okay :-)


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


# 58bee544 19-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Renamed _CheckSizeLimits() to UpdateSizeLimits() and made it public.


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


# 1d6c7b6c 17-Aug-2010 Alex Wilson <yourpalal2@gmail.com>

Big change deriving BLayout from BLayoutItem, and allowing viewless BLayouts.
a few highlights:
* BLayout now derives publicly from BLayoutItem
* Added BAbstractLayout class, which our layouts now derive from
* updated layout builders to avoid creating views when they don't need to
* updated layout classes
* updated AboutSystem to fix a little regression
* more details on #6407
* please tell me about any regressions, I've tried to find them all, but some
may have slipped by.


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


# 0c9f5a02 25-Jun-2010 Wim van der Meer <wpjvandermeer@gmail.com>

* Modified PtrScr key behaviour:
- No modifiers: take a screenshot with zero delay and launch the GUI
- Shift-PrtScr: Silent screenshot using the saved GUI settings
- Ctrl-PrtScr: Take a screenshot using the saved GUI settings and copy the
screenshot to the system clipboard
* A few locale related changes (I am not sure how this works when a class is
shared between two applications, I hope I got everything right)



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


# 3417d2a9 08-Jun-2010 Wim van der Meer <wpjvandermeer@gmail.com>

* Rename "ScreenshotApp" to "Screenshot", rename its signature from
"application/x-vnd.haiku-screenshotapp" to "application/x-vnd.haiku-screenshot"
* Rename "Screenshot" to "screenshot", rename its signature from
"application/x-vnd.haiku-screenshot" to "application/x-vnd.haiku-screenshot-cli"
* Move screenshot from /system/apps to /bin


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


# 5396d90d 07-May-2010 Axel Dörfler <axeld@pinc-software.de>

* Made zooming to full screen center the window when the window cannot be made
full screen (due to size restrictions).


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


# 139aacf4 06-May-2010 Axel Dörfler <axeld@pinc-software.de>

* The window was now always taken to the new workspace with Ctrl-Alt-arrow;
lazy debugging left over that closes ticket #5675 again.


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


# 0a51dbde 02-May-2010 Axel Dörfler <axeld@pinc-software.de>

* Unified the Desktop and ServerApp AS_ACTIVATE_WORKSPACE to work in the same
way.
* Use that newly exposed feature of taking the focus window to the new workspace
when using the Ctrl-Alt-Shift-Arrow shortcut.
* This fixes #5675.


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


# 43a7eb6c 21-Feb-2010 Stephan Aßmus <superstippi@gmx.de>

Add comment explaining why MenusBeginning() is invoked before handling key events
with the command key pressed.


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


# 85874d8d 04-Feb-2010 Stephan Aßmus <superstippi@gmx.de>

When a Window is created for holding BViews attached to an offscreen bitmap,
always behave as if within a transaction. Otherwise all drawing calls to such
BViews wait for the server to finish the request. This change gives a tremendous
speed boost for these situations and is compatibly with BeOS, since there you
also had to call Sync() before drawing a bitmap that was painted with attached
views.


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


# 5f341c38 29-Nov-2009 Philippe Saint-Pierre <stpere@gmail.com>

Reverting r34335. Wrong location of my "B_NOT_MINIZABLE" check.



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


# 2c9bea98 28-Nov-2009 Philippe Saint-Pierre <stpere@gmail.com>

Make BWindow honor the B_NOT_MINIMIZABLE flag. Fixes ticket #4337.


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


# 09749e95 18-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a BWindow::InViewTransaction() that determines whether or not the
window is currently updating its drawings as suggested by Stippi.
* Add this method to decide whether to call _FontChanged() in
BListView::SetFont().


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


# 289d85d2 18-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* BWindow::SendBehind(NULL) will now send the window to back.
* Added shortcuts ctrl-alt-F to get a window to front, and ctrl-alt-b to move it
to the back.
* Updated the user guide with these shortcuts, and also explained the missing
"single click to bring window to front" behaviour.


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


# 5a0982b5 16-Nov-2009 Jonas Sundström <jonas@kirilla.com>

Spelling

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


# 80351b4d 21-Oct-2009 François Revol <revol@free.fr>

- this should fix gcc2 build, sorry ;)
- style fixes.


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


# 223ae47d 20-Oct-2009 François Revol <revol@free.fr>

Extend the Ctrl-Alt-arrows shortcuts to also move the current window when shift is held, as on Gnome.


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


# 81c431d2 05-Oct-2009 Michael Lotz <mmlr@mlotz.ch>

Include the terminating 0 byte when adding as string type. Otherwise someone
reading the message as an actual string will run into problems.
Should fix #4697.


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


# 8a5e590d 28-Sep-2009 Stephan Aßmus <superstippi@gmx.de>

Work based on a patch by Joshua R. Elsasser:
* Some key-sequences cause \0 chars in the "bytes" data which is supposed to
be passed to BView::KeyDown() and BView::KeyUp(). Therefor, one cannot use
string methods for adding/extracting the data to/from the events. For
example, Control-Space now works in the Terminal.

Thanks a lot for the original patch, Joshua!


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


# 4aa6ec09 02-Sep-2009 Axel Dörfler <axeld@pinc-software.de>

* IsMinimized() now locks the window. This should fix bug #4274.


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


# 19bce722 22-Aug-2009 Ryan Leavengood <leavengood@gmail.com>

Remove the forced resizing to preferred size when CenterIn is called, and
instead just check if the size limits need to be set. The code that previously
did this when processing the B_LAYOUT_WINDOW message was extracted into a
private method, which is called from both places.

This may be slightly wasteful in some cases (since the size limits may be set
multiple times), but it is definitely needed because without it both of the
current test apps (DiskProbe and Screenshot) did not have properly centered
windows.


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


# b0586d61 22-Aug-2009 Ryan Leavengood <leavengood@gmail.com>

Remove useless BRect* version of CenterIn, make remaining version take a const
BRect reference.


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


# 2ff62714 22-Aug-2009 Ryan Leavengood <leavengood@gmail.com>

Finally implemented BWindow::CenterOnScreen, with associated CenterIn(BRect)
methods as well as Size(). To avoid the problem of centering the window before
it has been resized by the layout system, I force the resizing early. If there
is a better way to do this or some way to avoid doing it repeatedly, let me
know. But I figure the Center* methods should not be called that often.

Updated Screenshot and DiskProbe to use this new method as a test. It certainly
cleaned up DiskProbe. I will update other code over the next few days (if
anyone wants to help, please do :)


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


# 1f3bec89 21-Aug-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

removed resolved TODO comment


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


# 87da7984 19-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Contrl-~ now switches between application windows. This is handier than the
mechanism used in BeOS, that is to press Control+Option-Tab (which didn't
work on Haiku, though).
* Did not change the window switch logic, though, so it's still not really
nice.


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


# 5b0a5c36 19-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Our jump-to-next-group never worked, and since no one complained, option-tab
now takes over this role (leaving Alt-Tab) to the application.


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


# 99452e33 10-Aug-2009 Jonas Sundström <jonas@kirilla.com>

Cleanup

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


# a57dddca 10-Aug-2009 Jonas Sundström <jonas@kirilla.com>

Add TabFrame window property.

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


# 8318af01 03-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a basic tool tip API, and implementation.
* The BView API can probably be regarded as good enough; the implementation
might need to be improved over time (also, some things as archivability
aren't fully implemented yet). The ToolTip.h header should get public once
finalized.
* Added new B_MOUSE_IDLE message that is sent to a BView after a certain
time has passed (BToolTipManager::ShowDelay()).
* Added small test app (ToolTipTest) that shows what is already working.


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


# 1d6720dc 27-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Don't use B_ZOOM; this does not respect the B_NOT_ZOOMABLE flag, same problem
as with B_MINIMIZE. This fixes bug #4134.


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


# 47d9ed62 27-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Added AS_GET_WORKSPACE_LAYOUT to get the number of columns/rows of the
workspaces.
* Added shortcuts Ctrl-Alt-{Left|Right|Up|Down} to switch to adjacent
workspaces.


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


# 6d52606f 27-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Don't use the B_MINIMIZE message for the minimize shortcut (ctrl-alt-m), since
that ignores the B_NOT_MINIMIZABLE flag. Instead, there is now a private
_MINIMIZE_ message (naming like those other ugly private BMessage constants in
AppDefs.h) which honours that flag.


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


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

* Style cleanups.
* Removed former dead print-screen code.


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


# ea603b7a 21-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

Small style cleanup.


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


# 8f24c711 20-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

Reverted my change to usage of _get_object_token_(), it already means to use
a cached token... doh! Thanks Axel!


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


# fa0ba1f8 20-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

Cache a view's server token. Avoids getting it for every
BView method that contacts the server.


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


# 591bc3f2 28-May-2009 Jérôme Duval <korli@users.berlios.de>

* various fixes identified by gcc4, provided by Joe Prostko


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


# f2471136 31-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

Added DecoratorFrame() method, which returns the outer frame of the window
on screen (ie including the decorator border and tab). Plus the necessary
refactoring as well as some TODO notes about windows with the tab on the left
side.


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


# 68b8f65f 29-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Reworked r29180 to make _HandleKeyDown() no longer rely on the active window
but if the message was targeted to the focus view. It will now only handle
shortcuts in this case.
* This also fixes bug #3513.


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


# 91f10b0a 09-Feb-2009 Jérôme Duval <korli@users.berlios.de>

* it seems we can skip _HandleKeyDown() when not active (keyboard navigation, shortcuts and screenshots).


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


# a13e53fe 09-Feb-2009 Jérôme Duval <korli@users.berlios.de>

* Handles shortcuts only when the window is active. This fixes bug #3414 (and hopefully is the R5 behavior).


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


# 6eb09230 01-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

* Resolve further warnings on GCC4.
* Enable -Werror on GCC4 builds as well (limited to the same selected targets).


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


# 18cd67c7 22-Jan-2009 Michael Lotz <mmlr@mlotz.ch>

Add missing headers (malloc/free, string functions, memcpy, etc. undeclared).


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


# 3dc4e7fa 15-Jan-2009 Axel Dörfler <axeld@pinc-software.de>

* The move/resize window protocol now uses absolute coordinates rather than
relative ones. This fixes bugs #2658, and #3213; in BWindow::ScreenChanged()
the window does not yet know that it moved on the new screen (when it already
had a position on that workspace).


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


# 860678c2 28-Nov-2008 Stephan Aßmus <superstippi@gmx.de>

At some point, there was some hassle about what coordinate system the "where"
BPoint in a mouse moved message is. Turns out it's different (!) according
to the type of message and this is even documented in the BeBook. I don't
really know if we want to copy this, but since there are apps out there that
depend on this, I am implementing it so that it's compatible with BeOS: In
the B_MOUSE_UP/DOWN case, it's the coordinate space of the target view, in
B_MOUSE_MOVED messages, it's that of the window. That explains a few things...
Clicking into Pe's function popup window should now select the right icon.


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


# 6cf3a9eb 16-Nov-2008 Rene Gollent <anevilyak@gmail.com>

The previous commit exposed another bug: BWindow::Zoom() incorrectly calculated the max height of the window by only including the border width once. This was previously masked by the fact that the (by default 5) extra pixels were included in its hardcoded default for the height of the tab. Also add the border width to the message returned by GetDecoratorSettings() so Zoom can use the actual value instead of hardcoding it.



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


# ca9a6131 16-Nov-2008 Rene Gollent <anevilyak@gmail.com>

Resolved a small todo thanks to r28664:
We now ask the app_server for the window tab's height instead of
hardcoding it.



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


# 783d616d 16-Nov-2008 Stephan Aßmus <superstippi@gmx.de>

Minor style fix.


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


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

* Replaced some "new" with new(std::nothrow) where appropriate in our base
classes (BView, BWindow, BAlert, BButton - BTextView should be part of this,
too, to make BAlerts work).
* However, it's not that simple, because there is often no way to return an
error. Most of that code obviously assumes to be able to throw exceptions
(it's just not communicated to the caller). Maybe we should just start
documenting exceptions for R1 (and properly use exceptions later on).
* Automatic white space cleanup.


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


# a5a4ec57 04-Nov-2008 Stephan Aßmus <superstippi@gmx.de>

Fixed two more problems with BWindow::FindView(BPoint):
* The function is not supposed to return hidden views.
* After iterating over the child views, the "view" variable was clobbered,
so it didn't work to return the current view if none of it's child views
were hit.


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


# 73ca5aff 01-Nov-2008 Rene Gollent <anevilyak@gmail.com>

Fixed numerous problems in BWindow::_FindView:

1) If a view contained the point, but had children, that view would never be returned as a result, even if none of the children matched.
2) When converting coordinates to the child's coordinate space, it was using the bounds rectangle rather than the frame. This in most cases had the result that the coordinate was unchanged, and thus messed up the search completely.

This fixes ticket #3000.



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


# d7513239 18-Oct-2008 Karsten Heimrich <host.haiku@gmx.de>

* reintroduce member fOffscreen which got removed in r2917
* check if locking the offscreen window succeeds before calling delete on it
* don't return offscreen windows in CountWindows and WindowAt (works now as on R5)

fixes ticket 1522, 1591, 1946, 2318 and propably more

While creating an BBitmap in BApplication the bitmaps window looper would
be added to the applications gLooperList, thus calling Quit() on that window
and later delete on a stale window pointer in BBitmaps dtor. The Lock() check
would fix the problem, but tests on R5 have shown that BApplication hides the
offscreen window in CountWindows() and WindowAt().



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


# 39fbf550 15-Oct-2008 Oliver Tappe <zooey@hirschkaefer.de>

bonefish + zooey:
* Fixed a general problem with respect to overriding of the reserved
virtual function slots: instead of statically invoking the method
that corresponds to the reserved slot on the class that contains the
slot, we now invoke the virtual Perform() method. Perform() then dispatches
the method invocation to the "proper" class, i.e. the highest class in the
hierarchy that actually implements the requested method.
This fixes a crash in apps that use liblayout's MSlider class and
should fix one or other spurious bug with old apps or libraries, too.
* added new header folder 'binary_compatibility' that contains files that
define the method codes and data structures required by Perform()
* looked for and implemented all used reserved virtual slot functions to
invoke Perform() where necessary or to pass on the method call statically
(for slots that were already maintained by Be)


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


# 350b87c7 13-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

zooey + axeld + stippi:
Fixed a problem with dispatching B_MOUSE_MOVED messages to views which need
the transit event:
* If the app_server decided to send a B_MOUSE_MOVED to the previous mouse
containing window, it forgot to add the _feed_focus flag, which was a problem
if the message actually happened to contain tokens (views that registered
for events.) On the client side, only those views would receive the message,
while the regular last mouse moved view would not be notified at all.
* On the client side, never change fLastMouseMovedView if the message is not
targeted at the preferred handler. In the above situation, any "registered
for events views" would receive the message first, but viewUnderMouse would
be NULL and then when the regular last mouse moved view received it, it
resulted in the wrong transit (B_OUTSIDE_VIEW instead of B_EXITED_VIEW).


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


# 71ea6c92 12-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

* Refactored a method for getting the transit from a mouse moved message.
* In _StealMouseMessage(), don't maintain fLastMouseMovedView, instead,
prevent B_MOUSE_MOVED message from being stolen that are important for
detecting transit changes. The point is that some apps (like Tracker) are
shooting themselves in the foot because they steal mouse messages via
GetMouse() in one place, but then rely on sane transit values in another
place. The way it works now, the view in question may get notified of the
same mouse moved coordinate twice, once via GetMouse() and once via
MouseMoved().


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


# eb1466cf 30-Sep-2008 Karsten Heimrich <host.haiku@gmx.de>

* use the screenshot app to take a screenshot
* remove libpng and libz dependency in case we build for Haiku



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


# 0cafe2df 26-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

* Fixed a race condition in BWindow::Show(). If it was the first time Show()
was called, the calling thread could be preempted, or simply be blocked on
calling Lock() after running the window thread. The window thread in turn
could be processing messages. In that case, fShowLevel would still have the
wrong value. For example, MediaPlayer would call IsHidden() on one of it's
views, which would then return true for this case. The result was that the
video view was not hidden and a black rectangle was showing on top of the
controls. This may also have caused other similar problems of course.
* fRunCalled was accessed without holding the lock.


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


# 51805689 03-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* BWindow::Activate() now also unminimizes a window if necessary.
* Removed superfluous white space.


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


# 84c9d73d 18-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

In the B_MOUSE_MOVED message, "where" is supposed to be in window coordinates
while "be:view_where" is in view coordinates. We made the mistake of having
them both be in view coordinates. This caused a problem for example in Vision.
(#2460)


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


# 674c8bc8 10-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

Added TODO about a problem that the late mouse moved message dropping code
may have.


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


# dde9faab 10-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

* Made the mouse moved message dropping code slightly nicer to read.
* Don't drop messages which carry an important transit value. (Thanks, Axel!)


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


# bb73c05f 09-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

* Introduced a new view event mask flag: B_FULL_POINTER_HISTORY which,
when set, prevents any old mouse moved message discarding.
* BWindow::DispatchMessage(B_MOUSE_MOVED) checks the event time of the
message and discards too old events, but only if there is another event
in the queue and the view does not specify B_FULL_POINTER_HISTORY.
* BView::GetMouse() ignores the checkHistory flag passed to the function
in case the event mask specifies B_NO_POINTER_HISTORY.
B_FULL_POINTER_HISTORY on the other hand prevents the dropping of old
messages.


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


# eaa6da1e 19-Jun-2008 Stephan Aßmus <superstippi@gmx.de>

Use a flag in BWindow to store whether an update to a view (Invalidate()) has
been requested. The first call to a BView::Invalidate() will flush the link
so that app_server is notified as soon as possible. It makes no sense for
further calls to Invalidate() to flush also, since Flush() is not cheap. This
trick makes Invalidate() about 3.2 times faster, making it a cheaper operation.
I could not see any negative effects, I tested with apps that invalidate
multiple different parts inside a window in reaction to something. Thanks go to
Ingo who had the idea.


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


# 9c1328f0 09-Jun-2008 François Revol <revol@free.fr>

gcc4 fix.


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


# cf1c3227 08-May-2008 Jérôme Duval <korli@users.berlios.de>

use find_directory() instead of /boot/home/


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


# 6aede71c 29-Apr-2008 Ryan Leavengood <leavengood@gmail.com>

Resolve a TODO and fix another ancient bug, #386. Print Screen is now handled
by BWindow, no longer by the app_server. This should stop the "screen freeze"
effect.

This adds a dependency on libpng.so and libz.so to libbe.so. The same
dependencies and the PNGDump code added here can be removed from the
app_server. I am just waiting for a code review of this before doing that.

This implementation still does not give the client a chance to handle it
differently.


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


# e0da34f5 17-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

* "where" and "be:view_where" are supposed to contain the same value; dunno
why the latter is then even added, but we do the same thing as BeOS now.
* This fixes bug #2075.


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


# 10f4d067 11-Apr-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added a class MenuPrivate to handle access to private BMenu methods.
BMenuItem and BWindow are no longer friends of BMenu, but use this class
instead.


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


# 5c9a6b8c 06-Mar-2008 Rene Gollent <anevilyak@gmail.com>

As per discussion on haiku-dev, BWindow now always forces the
B_ASYNCHRONOUS_CONTROLS flag. If anyone does encounter an app that
breaks because of this, please let me know, but a few tests with various
apps seem to show no issues.



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


# c3b57150 19-Feb-2008 Stephan Aßmus <superstippi@gmx.de>

I was just going to implement Begin/EndViewTransaction(), but I saw
it is already implemented they way I thought it could be done - nice! Just
some simplifications.


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


# ec20f9f6 18-Feb-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

reverted r21961. A menu could be closed, if the user
clicked (with the menu opened) on a view which uses GetMouse() in a loop
(PE, tracker), since it stealed the mousedown message.



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


# 1ea104ae 05-Feb-2008 Axel Dörfler <axeld@pinc-software.de>

UpdateIfNeeded() no longer keeps the looper's BMessageQueue locked when
calling DispatchMessage().


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


# 7cb93378 04-Feb-2008 Axel Dörfler <axeld@pinc-software.de>

* Ingo broke binary compatibility of Window.h in r18649, thanks to Stefano
for finding this. This should fix bug #1734.
* Removed unused BWindow members and the temporary PrintToStream() method.
* Indentation cleanup (DirectWindow.h had some spaces instead of tabs).


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


# 0625889c 10-Jan-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

IsModal() now includes also the kMenuWindowLook. Fixes bug #1269. Please
review.
Added a compile time option to switch off the use of the cached menu
windows. Looks like there is a problem with the focus system, if I keep
the cached menu window around, it "steals" keyboard events from the main
app window after the menu has been opened and closed once.


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


# 33d3580b 30-Dec-2007 Axel Dörfler <axeld@pinc-software.de>

Fixed copy&paste bug, thanks Stefano!


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


# deb58f16 29-Dec-2007 Axel Dörfler <axeld@pinc-software.de>

* DispatchMessage()'s B_WINDOW_ACTIVATED now checks if there are any pending
activation messages, and always retrieves the information from the latest.
* Reverted r23062, as the above should fix bug #613 as well.
* This should also fix bug #1674.


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


# 099fb2d3 25-Dec-2007 Stephan Aßmus <superstippi@gmx.de>

* removed declarations for methods which are not used/implemented in View.h
* improved naming of some private BView functions and used our underscore
prefix
* added a _DrawAfterChildren method to BView which does the necessary setup
and calls the DrawAfterChildren hook
* call the new _DrawAfterChildren method in the BWindow implementation, this
was easy since the view tokens are already hierachically sorted
* implement support for B_DRAW_ON_CHILDREN in the app_server's ViewLayer, it
simply means that children are ignored for the views clipping region, any
drawing methods will paint over children (therefor the B_DRAW_ON_CHILDREN
flag is even properly named)

With these changes, support for B_DRAW_ON_CHILDREN and the DrawAfterChildren()
hook are implemented and behave exactly as on R5 as far as I can tell, also
for the view background painting.



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


# ebe41f1a 04-Dec-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

added a TODO item


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


# d7c343d9 04-Dec-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Dispatch also the B_WINDOW_ACTIVATED messages. This fixes bug #613, but
we need to check which other messages are handled by beos here.


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


# 7acb68ed 25-Sep-2007 Axel Dörfler <axeld@pinc-software.de>

Made the private B_HIDE_APPLICATION message (now a misnomer) hide all applications
that share the same signature - so that this feature is now consistent to what the
Deskbar does.


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


# 229f4986 25-Sep-2007 Axel Dörfler <axeld@pinc-software.de>

* Added private (as of now) B_HIDE_APPLICATION message that calls
do_minimize_team() (which is what the Deskbar does when you select
"Hide All").
* Added keyboard shortcuts to minimize, and zoom a window, and to hide
the whole application (Cmd+Ctrl+M/Z/H respectively). The former two
are also present in Dano and up.


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


# 22ca66b9 28-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

Fixed bug #1028 from both sides:
* FindPanel::SetUpAddRemoveButtons() called Window()->FindView() but did not
check if Window() was NULL.
* BWindow now always checks the result of a BAutolock - this is why Tracker
got away with this bug on BeOS; NULL windows cannot be locked...


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


# b7858373 20-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

The client-side implementation of B_NO_POINTER_HISTORY did only work for SetEventMask(),
but not for SetMouseEventMask(). We now track the value of that mask in a dedicated
member variable.


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


# e46b2254 20-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

The server is too fast sending the messages; we now filter out old mouse events
client side in case B_NO_POINTER_HISTORY is set.
This fixes bug #1415.


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


# cc116483 14-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

The bug worked around in r21960 also affected Haiku. Now, a menu is only quit if the click
into its "controlling" window targeted the preferred handler - ie. is a standard click that
is not sent because of an event mask.


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


# b7364864 14-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

* Fixed the TODO added by Ingo in r21957: locking the application didn't even make any
sense. Instead, we now lock its app_server connection only. The deadlock as exposed
by starting Icon-O-Matic twice is now gone, at last.
* Fixed the TODO added by Ingo in r21953: moved the thread/handler renaming code in a
dedicated method _SetName() which is now called from _InitData() and SetTitle(); the
"w>" is no longer lost.
* Unlike the BeBook states, BMessageQueue::RemoveMessage() is indeed not supposed to
delete the message it removes.


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


# 78fe3db2 14-Aug-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added another TODO.


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


# a1a14482 14-Aug-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added TODO.


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


# 7a90948b 01-Jul-2007 Stephan Aßmus <superstippi@gmx.de>

* this should fix BWindow::FindChild(BPoint)


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


# 1e651d5b 03-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

Modal windows no longer install the 'Q' shortcut anymore. This fixes bug #1256.


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


# 288e1788 03-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

Implemented B_CLOSE_ON_ESCAPE as mentioned on the mailing list.


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


# 8860ba90 24-Apr-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

If there's a opened menu, the window should "eat" the B_MOUSE_DOWN
message. This fixes bug #582 and now menus behave like on beos (or
should, at least)


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


# f5faf48a 17-Apr-2007 Axel Dörfler <axeld@pinc-software.de>

Small fix for _StealMouseMessage(): only if "feed focus" is "false", the message
can't be used.


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


# ffcc37a0 14-Apr-2007 Axel Dörfler <axeld@pinc-software.de>

* Added and implemented B_INVALIDATE as available on Dano; to invalidate only a certain
part of the view, you can add a BRect "be:area" to that message - very handy.
* Cleaned up AppDefs.h a bit.


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


# 9dbe170a 26-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Implemented direct message passing for local targets; this fixes a deadlock
with PostMessage() in case the message queue is full.
Some notes:
* for synchronous replies, we don't use this mechanism yet, but it could be
extended to do that as well.
* the code looks so complicated because we need a way to access the looper's
queue without locking it (to prevent deadlocks); like Dano's solution, I've
abused BTokenSpace to store a BDirectMessageTarget with a BHandler.
* we also need to decouple the lifetime of a looper's queue from its target,
as we cannot lock the looper, and therefore, can't guarantee it stays valid
as long as we're accessing it outside of BLooper.
* init_clipboard() now needs to be done after the global constructors have
been called - since sending messages now needs gDefaultTokens to be initialized.
Since this is done per image, it shouldn't cause any troubles, though.
* some minor cleanup, removed unused _msg_cache_cleanup_() and friends.


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


# c01f349e 25-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Cleanup:
* Got rid of unused BLooper members
* renamed fTaskID to fThread
* Removed private and deprecated AddLooper()/RemoveLooper()/... stuff; BLooper is now
directly calling BLooperList methods.
* Got rid of extensive and useless comments
* Made a few TODOs more clear
* Merged InitData() and InitData(...) to _InitData(...)
* BLooper::Team() now uses BPrivate::current_team(), sTeamID is gone now.


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


# e30afed4 19-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

As per Ingo's request, I moved calling BRoster::Private::UpdateActiveApp() into
the app_server (and updated all comments that said otherwise).


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


# c2f641f2 18-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Turns out the whole "active app" mechanism in the registrar wasn't used at all; the
Switcher now works as expected.
* Renamed TRoster::ActivateApp() to UpdateActiveApp(), as the app is already activated
at that point (the registrar only keeps track of it).
* BWindow::DispatchMessage() now calls the new BRoster::Private::UpdateActiveApp()
method when it receives a B_WINDOW_ACTIVATED message.
* Added BRoster::_UpdateActiveApp() which calls the new B_REG_UPDATE_ACTIVE_APP.
* Removed now unused B_REG_ACTIVATE_APP.
* Minor cleanup.


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


# badbad99 18-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Messed up logic last time - the cursor should now work as expected again in BTextView.


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


# 6c3692dc 17-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Turns out our pulse mechanism was broken; we need to honour the rate set by
SetPulseRate() even if it is 0. BView::_Attach() and BView::SetFlags() now
just set the previous pulse rate again (which will start pulsing in case
there is no fPulseRunner yet).


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


# 2a720453 17-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

One step closer to the Switcher - still doesn't work, though, but at least the
BWindow code looks okay now.


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


# ccf137b8 06-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

BWindow::IsFront() was implemented incorrectly - we actually need to query the
app_server for this; added a new AS_IS_FRONT_WINDOW command for this.
For example, clicking on the menu bar to bring windows to front in FFM mode
does work now.


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


# fbeb1fca 01-Nov-2006 Jérôme Duval <korli@users.berlios.de>

Notifies input_server about the focus view IM awareness when the window is (de)activated
This fixes the last part of bug #658


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


# cc347633 26-Sep-2006 Axel Dörfler <axeld@pinc-software.de>

This fixes bug #851 - GLTeapot unlocks the window before indirectly calling
BWindow::UpdateIfNeeded(); BPopUpMenu::Go() should be independent of this.


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


# 946d88f9 12-Sep-2006 Axel Dörfler <axeld@pinc-software.de>

We're now using the same priorities for windows as BeOS does - this should improve
the responsiveness of the GUI, and should also fix bug #742.


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


# 9ecf9d1c 26-Aug-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge from layout management branch.


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


# 967302c5 23-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed a stupid copy&paste bug.


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


# fa407130 24-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

Now this should nail down bug #762 pretty well: BView::GetMouse() no calls the
private BWindow::_StealMouseMessage() which makes sure only messages for the
preferred handler are stolen, and also, that nothing gets lost that shouldn't
get lost.
Also updates the fLastMouseMoved view in case the message is actually removed
due to GetMouse().


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


# f60d8e0b 23-Aug-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Replaced Unlock() with UnlockFully() in BWindow's destructor, fixes bug
406


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


# 9319c7b8 07-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

We don't add the Alt-w shortcut to modal windows anymore
by default, thanks to Darkwyrm for pointing to this.


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


# 4fec945a 02-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

Stefano's investigations did the trick: added MenusBeginning()/MenusEnded() in
the shortcut evaluation.
This fixes bug #531.


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


# 72122293 15-Jul-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

The BWindow destructor is called with the window locked, but we need to unlock to acquire the menu semaphore. Updated BBitmap to lock he window on quit too. This fixes last problem mentioned in bug 406

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


# 11235ae7 10-Jul-2006 Jérôme Duval <korli@users.berlios.de>

"class" is added by BArchivable::Archive(), no need to duplicate


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


# 8ebbfab3 20-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

When the B_COMMAND key is pressed, the event will not be forwarded to the target
handler anymore, no matter if a shortcut existed or not.
This fixes bug #498.


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


# 7477c792 14-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* Dropped messages come in a _MESSAGE_DROPPED_ "packet", and were unpacked much too
late, in DispatchMessage(), working around all eventually installed message filters.
This fixes the odd "cannot drop files into file panel" bug mentioned in bug #669.
* They are now handled in _DetermineTarget() and _SanitizeMessage().
* _SanitizeMessage() is now called earlier, so that no user code can see them before;
even though this might give you wrong MouseDown() coordinates in combination with
a redirecting message filter, I think that's exactly what would happen in this
situation under R5 as well.


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


# da08acb8 12-Jun-2006 Jérôme Duval <korli@users.berlios.de>

fix some more bugs in scripting handling, this seems to never end
Having canna input method installed shouldn't crash Haiku anymore


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


# 5b741ecb 12-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed warning.


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


# e91315aa 11-Jun-2006 Jérôme Duval <korli@users.berlios.de>

scripting in BApplication is mostly fixed
BLooper had a be-handler named suite
BWindow is now exposing Active
scripting to BViews isn't working yet


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


# f4fc3d62 05-Jun-2006 Jérôme Duval <korli@users.berlios.de>

* fixed some more GetSupportedSuites implementations
* fixed some local variables names
* fixed the case of some message attribute names


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


# a03ac895 05-Jun-2006 Jérôme Duval <korli@users.berlios.de>

fixed some property_info and value_info for BShelf, BMenu, BWindow and BView
real support is to be implemented for a lot of them


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


# 79adc02b 04-Jun-2006 Jérôme Duval <korli@users.berlios.de>

begin to fix bug #658:
makes use of BWindow::_SetFocus() in BView::MakeFocus()
BWindow::_KeyboardNavigation() now uses BView::MakeFocus()
This is though not enough: _SetFocus isn't called on window activation/deactivation, thus the input server isn't aware of a focus view change in this case.


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


# 95f766fa 31-May-2006 Stephan Aßmus <superstippi@gmx.de>

cleanup of archiving code

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


# 848b8903 27-May-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

More hacks to BWindow's mousedown handler, to fix some problems with menus. Fixes bug 610 among other things. Note: I don't like this code so much, but apparently BeOS handles it in a similar way. I accept suggestions on how to improve this.

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


# e061d1ba 27-May-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

an eventually opened menu is now quit in BWindow::DispatchMessage()
before sending a B_MOUSE_DOWN message to any other view. This fixes bug
594 for real and another bug in BMenuBar. BMenuBar tracking will also
be simplified a bit because of this. Install items to a NULL window on
Show() as does R5 (although I don't know why yet).


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


# a502e8cd 27-May-2006 Stephan Aßmus <superstippi@gmx.de>

sorry, forgot about this change... fixes build

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


# b30e9021 24-May-2006 Stephan Aßmus <superstippi@gmx.de>

added a way for BWindow to store and restore arbitrary decor settings,
currently those include only the tab location


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


# 3279f3b0 03-May-2006 Michael Lotz <mmlr@mlotz.ch>

Detect recursions of UpdateIfNeeded. This is necessary as we may call hook functions (FrameResized(), FrameMoved()) that in turn could call UpdateIfNeeded again. This is the case for DarkSite which uses GetMouse() inside FrameResized(). This fixes resizing DarkSite and probably fixes bug 539 too.

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


# 9991d2b1 01-May-2006 Axel Dörfler <axeld@pinc-software.de>

* Applied patch by G. Zachrisson to fix the endless loop in _FindNextNavigable().
* Rewrote broken _FindPreviousNavigable() - it now does the exact opposite of
_FindNextNavigable().
* Both methods did not ignore hidden views - they now do.


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


# 29a92e4f 24-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Now checks all calls to Lock() - this should fix buggy apps like Globe in bug #499.


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


# cbdbfd3a 18-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Implemented Switcher support in BWindow - doesn't yet work correctly for some
reason, though.


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


# 8165fa39 17-Apr-2006 Stephan Aßmus <superstippi@gmx.de>

* fix bug 414 by Sync()ing in UpdateIfNeeded() to make
sure all messages that could trigger an update have
actually arrived at the server
* small clean ups here and there, some clarifications in
comments
* check for the return value of Lock() in DisableUpdates()
and EnableUpdates()


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


# a5c56979 17-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed starting keyboard navigation (when no view has focus yet in which
case the window receives the keyboard message).
This fixes bug #411.


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


# 39cdae74 10-Apr-2006 Michael Lotz <mmlr@mlotz.ch>

First steps at getting drag & drop to work properly. Simple drag & drop (draging Tracker items) should work now. Not sure about the negotiated version (with mimetype exchange). Fixed left behind drag bitmaps. Some cleanup.

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


# 835a7ebd 07-Apr-2006 Stephan Aßmus <superstippi@gmx.de>

no need to contact the server for this, transaction means that drawing commands are not immediately flushed, which is handled entirely on client side

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


# cb8bdc4e 05-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Window's destructor should acquire the menu sem, not delete it. Could help fixing bug 422

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


# 7bb48db1 04-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* The BView::FrameResized()/FrameMoved() hooks are now called asynchronously
as in R5, and no longer directly. This fixes bug #301.
* As a side effect, the hooks are now only called when the view is attached
to a window, as on R5.
* Removed dead B_VIEW_RESIZED/MOVED code from BWindow.


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


# 557e9c04 12-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Setting fRunCalled in case of failure is stupid, as this prevents the
window from being freed on Quit(). There still is a memory leak within
StressTest, though - but it's pretty tiny now.


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


# bc63570c 12-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

BWindow::Show() will no longer Run() its looper without a valid app_server
connection.
StressTest now detects this case and quits those windows.


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


# 3dd881e3 12-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed memory leak in StressTest and BWindow: they both did not delete the
message they passed to a BMessageRunner object.
* Added note about the ownership of the message to the BMessageRunner
documentation.


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


# ce0be66f 12-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

When the creation of the window failed, all further messages accidently went
to the ServerApp, instead of being dropped - the window link is now updated
correctly in that case.


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


# f025cd8b 12-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

While the user resizes a window, programmatical resize operations are ignored,
likewise, while the user moves a window around, programmatical moves are ignored
as well.
This fixes bug #264.


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


# ecf9f948 11-Mar-2006 Stephan Aßmus <superstippi@gmx.de>

* cleaned up fPulseRunner stuff, I have no idea why fPulseEnabled was
useful... so I removed it
* fixed memory leak with SetPulseRate(0), fPulseRunner is now
properly freed in the Window destructor
* fTitle is now freed as well
* fix some potential leaks in BView destructor as well

I wrote a stress test app, which I'm soon going to commit as well...
it shows that not all memory leaks are fixed by this patch, I could
use some help with this...



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


# da192ba4 10-Mar-2006 Jérôme Duval <korli@users.berlios.de>

implemented input_server notification of IM aware focus changes, not tested


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


# 9b5a1835 27-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed BWindow::Show()/Hide(): fShowLevel was changed and checked without
holding the window lock.
* Run() is now called before creating the window in the app_server when
Show() is called for the first time (which is now checked with fRunCalled
instead of some thread arithmetics).
* Minimize() now sends the show level of a window to the app_server, so that
it can actually determine if minimizing or maximizing the window should
have any effect. This fixes bug #225.
* fShowLevel's meaning is now reversed; when it's above zero, it now means
the window is shown (before, a level less than 1 meant shown). This definitely
better fits its name :)


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


# 05b9fbf5 17-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

Accidently broke the build with the previous revision...


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


# dd7b93c8 17-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

Window has to be locked when it's going down or its children are queried/changed.
This fixed bug #182.


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


# 35e74831 15-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

* Shortcut messages now add a boolean "shutdown" field to the message - this
prevents Tracker from being quit by Command+Q.
* Also, it's now possible (as on R5) to remove the Command+Q shortcut.


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


# 995ab7b3 09-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

The server now differentiates between hidden and minimized - that concept somehow
got lost, before.
It might not work 100% correctly yet, but it works good enough to hide the Tracker
status window from the Deskbar, and thus, fixing bug #133.


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


# c81d2e7a 09-Feb-2006 Stephan Aßmus <superstippi@gmx.de>

* fixed window zooming/unzooming behaviour
* fixed FrameResized() and FrameMoved() not
being called anymore in response to ResizeTo()
and MoveTo() since I introduced a check in
DispatchMessage() (fixes bug #123)


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


# 95e29889 06-Feb-2006 Stephan Aßmus <superstippi@gmx.de>

This fixes the update problems that I could observe. The client might have been not in sync with the server regarding window position and size, which in turn messed up the ConvertFromScreen() functions and also the view Bounds(). Therefor the current window geometry is also added to the information the client gets when starting an update session. I think the problem was there before my previous changes, just maybe less likely to be observed.


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


# bb160ab5 06-Feb-2006 Stephan Aßmus <superstippi@gmx.de>

change the way the _UPDATE_ message is used: it is now a mere notification that some views need updating. The BWindow will then pull data from the server which views exactly and the update rect. Therefor, the server can append regions to the current update session even if an _UPDATE_ message has already been sent to the client. If multiple views are invalidated in the client, only one update session will be triggered instead of two with the old implementation. Some drawing defects can be observed, but I know how to reproduce them so I hope to fix them soon.

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


# e9e5c69a 20-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

* Use _FindView() where possible instead of using BTokenSpace::GetToken() directly.
* Fixed some issues in _UnpackMessage():
- The focus view could have been removed before its turn which was ignored
(and could led to a crash, for example when moving the Deskbar around).
It's now tested if it's still valid (can't use _FindView() here, as the
the preferred handler of a window could be any BHandler).
- fLastMouseMovedView could have been NULL in which case there is no
need to let the message be processed (was harmless, though).


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


# 238ba7d3 11-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

The last change accidently put messages to invalid targets back into the game.
_DetermineTarget() is no longer called for these messages, "handler" will stay
NULL and the message will be dropped.


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


# 54354618 11-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

BWindow::_DetermineTarget() now defaults to the window, instead of no target at
all in case the window doesn't have a current focus view.
That allows shortcuts like Command+q/w to work again.


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


# 7afc7c50 08-Jan-2006 Stephan Aßmus <superstippi@gmx.de>

ServerFont:
* fixed weird pointer conversion in SetStyle()
* fixed a potential mix up in operator=() in case the
other ServerFont has fStyle == NULL

ServerWindow:
* the WindowLayer fTopLayer cannot be deleted by
client request, just for safety reasons
* the link is flushed if there is no drawing engine,
but this case is theoretical only
* deleting the ServerWindow object syncs with the
client, so that when BBitmaps are deleted, they
can be sure there are no pending messages (which
would be executed in a nother thread)
* there is no timeout anymore when sending messages
to the client, which made absolutely no sense

AGGTextRenderer:
* renamed fFontManager to fFontCache, because that's
what it really is
* fLastFamilyAndStyle defaulted to the system plain
font and therefor that font was never loaded when
the font never changed meanwhile

DrawingMode:
* I'm not quite sure but I think there was the
potential of a division by zero, at least I
had crashes with "divide error"

HWInterface:
* fix update when the cursor shape changed in
double buffered mode

ViewLayer:
* since the top layer is never really deleted
before its time has come, it is not necessary
to set it to NULL in the ViewLayer destructor

ViewLayer/WindowLayer:
* added a function to collect the view tokens
that are affected by an update session

EventDispatcher:
* use the importance of the message for the timeout
in _SendMessage()
* drop mouse moved events in the server if we're
lagging behind more than 5 ms (Axel, maybe review)

View:
* there were some problems with the locking
of the BWindow looper in RemoveSelf(), since
this is called from the window destructor,
also of BWindows from BBitmaps, which have
never been run (this might need review), at
least I seem to have solved the crashing
problems introduced by actually deleting the
view hirarchy in the BWindow destructor
* fixed _Draw() for being used non-recursively,
temporarily disabled DrawAfterChildren, which
didn't work yet anyways (because views cannot
draw over children in the server yet)

Window:
* small cleanup when deleting shortcuts
* sync with the server when having send
AS_DELETE_WINDOW (see ServerWindow above)
* fixed locking in Begin/EndViewTransaction()
* removed folding of _UPDATE_ messages, since
there is only one ever in the queue
* set the fInTransaction flag during an update,
I plan to use this in BView later to
flush the link when drawing outside of an
update
* BView::_Draw() is now called by view token,
this gives the next leap forward in speed,
the overhead because of drawing clean views
was considerable



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


# ea34f0f0 08-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

If there was a BMenuItem view with shortcut, it tried to delete the shortcut twice
(as the shortcut list wasn't emptied), courtesy of Stippi.


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


# fb82d189 06-Jan-2006 Stephan Aßmus <superstippi@gmx.de>

* BWindow deletes its view hirachry
* BViews set fOwner to NULL recursively when detached
* updated a comment


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


# 9f8f6275 29-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed shutting down apps with file panels - no more hang:
* if file panels shouldn't be quit, we no longer call QuitRequested() for
them and stop quitting windows (which left normal windows open, because
file panels always return "false" in QuitRequested())


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


# 36e605d5 20-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

combine _UPDATE_ and B_WINDOW_RESIZED messages, I left the old code commented, because my combining code might need review. I don't understand why the current message is still in the queue and why passing 1 as index to FindMessage does not seem to work, BMessageQueue::RemoveMessage does not delete the message as documented in the BeBook... everywhere else in the code it seems to be taken as a fact

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


# af43bb3c 07-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

a first and really naive implementation of drag&drop support, no visuals yet... Axel, no worries I'm going to clean this up and remove stuff from EventDispatcher again...

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


# 715476b7 06-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

The resize code now works correctly, finally - it temporarily did harm ;)
The BViews must be resized directly after every change in the window size - we
cannot wait until B_WINDOW_RESIZED, since subsequent calls have wrong view
sizes, then.
B_WINDOW_RESIZED is only really useful for app_server caused window resizing.
Added TODO to SetLook(): it may change the window size as well.


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


# 0a95bea6 06-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

fixed wrong usage of ConstrainClippingRegion() introduced by myself a couple months ago

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


# ac4fe990 05-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

* The client views are now automatically resized on B_WINDOW_RESIZED as they are in the
server.
This saves overhead on both sides, the server doesn't need to build the update message
for the client, and the client doesn't have to unflatten and parse another message.
* This code is actually needed for the new clipping code in the app_server, but shouldn't
do much harm for the old app_server, either.
* Also disabled getting the bounds from the server, as that is just never needed (and would
also break the code).


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


# c072e9f1 02-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

* BWindow::AddToSubset()/RemoveFromSubset() no longer send their team ID; this
is known by the server, anyway.
* B_MODAL_SUBSET_WINDOW_FEEL now also works as expected.
* Renamed AS_REM_FROM_SUBSET to AS_REMOVE_FROM_SUBSET.


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


# 05aea1dd 01-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

Better app_server communication for SetFeel(), SetLook(), and SetFlags().
SetFeel() gets a status value back as well.


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


# 349837d9 28-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Some cleanup in the communication code.


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


# 7c686564 25-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* Don't trust a message that we got goes to a handler that belongs to us.
* when we terminate gracefully and in the looper's thread, we no longer
unlock ourselves.


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


# 84081467 25-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Don't trust the app_server that the view token under the mouse belongs to the
current looper.
This needs an investigation in the app_server, as that probably shouldn't happen?
(well, I wrote that part, I should know better)


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


# 147bfa2a 24-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed the port where app_server messages are received from "w_rcv_port" to "w<app_server"
to match the name of the application's port for that task.


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


# 860c1447 24-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

No longer checks if there is already a "be:transit" item in the message;
there should never be one (at least not a valid one).


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


# 5604d3c9 24-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* _DetermineTarget() will now return fLastMouseMovedView in case there
was no valid "_view_token" in the mouse event.
* _SanitizeMessage() will now only add the "be:transit" field for
B_MOUSE_MOVED messages. It will also now only update fLastMouseMovedView
for B_MOUSE_MOVED messages, and not for all mouse messages.


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


# 43ca7765 23-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* applied the logic from BWindow::task_looper() to BLooper as well (messages to
invalid target handlers are dropped).
* B_PREFERRED messages now go to the looper if there is no other preferred handler.


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


# 6450b76d 23-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Next big step in the event handling:
* RootLayer's mouse event processing is now at its minimum - the
EventDispatcher handles them now. As a result, a window will now
get only one message per event.
* RootLayer adds "_view_token" to mouse moved messages that specify
the view currently under the cursor.
* There is now a mouse event layer in RootLayer that gets preferred
when it's set - this is now used for the window moving instead of
the previous mechanism.
* changed the previous DistributeMessage() to an UnpackMessage()
method following Adi's suggestion.
* caveat: some things might be functionally broken in RootLayer now
because of removing the mouse notification stuff.
* "be:transit" handling is now done completely client side by
BWindow::_SanitizeMessage(() (similar to what the input_server does).
This should also make the mechanism pretty robust, since every
B_MOUSE_MOVED message can now trigger the view transit (in case a
message is lost). B_WINDOW_ACTIVATED messages should be generated
client side as well.
* renamed AS_LAYER_GET_MOUSE_COORDS to AS_GET_MOUSE as it's not a
layer specific command, and also gets the mouse buttons.
* B_MOUSE_* messages from the up server now contain only a "screen_where"
field; "where" (in window's coordinates) and "be:view_where" are
added in BMessage::_SanitizeMessage().
* messages that don't have a valid target in the looper are now
dropped instead of being sent to the looper - this should be done
in BLooper as well, though.


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


# b0952015 21-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* changed the way a message is forwarded to the focus view (instead of adding
a suspend focus field to the message, there is now a "feed focus" field in
case the message should be forwarded).
* added a comment to the BPoint version of _FindView() (since it's broken)
* _DistributeMessage() is now called after _DetermineTarget() - so that it
can prevent sending the message twice to the focus view.
* removed BWindow::DoUpdate() as it's no longer used.


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


# c919ec68 21-Nov-2005 Michael Lotz <mmlr@mlotz.ch>

Fixed build for non-Message4 again. Both BMessage::Private classes should be compatible.

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


# 14d02d22 21-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Huge cleanup and fixes:
* attachView() is now called _CreateSelf() and creates the app_server
view counterpart for itself, and no longer for a child view.
* removed superfluous deleteView().
* moved drawing from BWindow::DoUpdate() to BView::_Draw().
* made the recursive hook call functions consistent.
* fixed BWindow::DispatchMessage() to send public messages to the intended
target (instead of always handling them itself directly).
* DispatchMessage() no longer eats unmapped key events that were targeted
at the window directly.
* B_KEY_DOWN and B_KEY_UP events are now send to the target view as well
(this couldn't work before as BMessages were broken with B_PREFERRED_TOKEN).
* the default button is now correctly targeted by BWindow::_DetermineTarget()
(previously, the enter key was hacked to get through via _HandleKeyDown()).
* removing a view now also makes sure it won't have focus any longer.
* also, the DetachedFromWindow() hooks are now called first, so that any
changes made there cannot mess up our window anymore.
* removed BView::SetPattern(); _UpdatePattern() now does its job.
* renamend private methods to match our preferred style.
* removed unused methods and variables.
* more consistent naming overall.
* removed _PR3_COMPATIBLE_ stuff - there is definitely no need for us to be
compatible to that one.


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


# 4ceb1e51 20-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* reverted Adi's premature changes to BWindow and restored _DetermineTarget() and
task_looper() again.
* removed BMessenger::fPreferred - whenever you had to specify "usePreferred" separately,
you don't have to do that anymore - use B_PREFERRED_TOKEN instead.
* fixed BTokenSpace::GetToken() semantics: it will no longer touch the "object" argument
in case of failure.
* Introduced a BWindow::_DistributeMessage() that will be part of the event dispatcher
counterpart to the app_server (the other will be _DetermineTarget()).
* Made it easier to use Michael's Message4 implementation: just add the following line
to your UserBuildConfig:
AppendToConfigVar DEFINES : HAIKU_TOP src : USING_MESSAGE4 : global ;
* Introduced ServerWindow::HandlerMessenger() and FocusMessenger() - the first will
target the client handler, while the other will target the preferred handler of the
client looper (usually the view having focus).
* Fixed dano message unflattening in the Message4 code.
* Changed BMessage::PrintToStream() to no longer use macros in the Message4 implementation.
* I hope that's all - it's a huge change, but it's all connected.


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


# ace01f86 19-Nov-2005 Adi Oanca <adioanca@nowhere.fake>

Removed BWindow::_DetermineTarget(). BWindow's task_looper() just calls BLooper's one. Took Message4 stuff from BWindow's task_looper() and put it in BLooper::task_looper() - guess this is wanted...

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


# 0139f287 19-Nov-2005 Adi Oanca <adioanca@nowhere.fake>

Following recent changes (Axel's token stuff or Message4 impl) I could not launch a single application/window in app_server. This fixes the problem. Note I always test with DEBUG=1. Am I the only one who had this problem?

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


# 8bd2c11f 13-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Moved the declaration of roundf() to HaikuBuildCompatibility.h - it's missing from
math.h but exported by libroot.so.


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


# 5fa64315 13-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* no longer needs to define roundf() as it's now part of libroot.so (like on BeOS).
* for the libbe_test target, though, I need to declare it, although it's also declared
in BeOS' math.h - Ingo??
* removed comment about B_ASYNCHRONOUS_CONTROLS - it's only used by our control classes
to behave differently depending on that flag (mouse tracking).


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


# cf10934e 13-Nov-2005 Michael Lotz <mmlr@mlotz.ch>

Introducing Message4. The changes to the related sources are ifdefed with USING_MESSAGE4 which is defined in Message4.h. To use Message4 the Message4.cpp, Message4.h, MessageUtils4.cpp, MessageUtils4.h and MessagePrivate4.h have to be linked to their counterparts without 4 suffix. Then MessageBody.cpp and MessageField.cpp have to be commented out in the app kit Jamfile and r5_message.cpp has to be added. There remain some bugs to be found. Feel free to change that.

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


# d51a034e 12-Nov-2005 Stephan Aßmus <superstippi@gmx.de>

prevent windows from being located at fractional offsets, fixes BAlerts (again)

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


# 292d5ced 12-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* Rewrote shortkey handling - it now actually works as expected.
* Some work on _DetermineTarget(), more to come.
* Minor cleanup.


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


# bfe7d52d 12-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Shortcuts now at least somehow work, but the mechanism is still broken.


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


# 9032e712 11-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

InitData() no longer calls SetTitle(), but sets the title directly.
SetTitle() now also works when called before the window is shown for the first time
(ie. before the window thread is running).


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


# 81115391 10-Nov-2005 Stephan Aßmus <superstippi@gmx.de>

a quick solution to get some B_EXITED_VIEW transit when the mouse leaves a view, probably gets replaced when Axel is looking into the event handling stuff

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


# 9783d238 30-Oct-2005 Adi Oanca <adioanca@nowhere.fake>

just a change of constants.

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


# 5412b02d 29-Oct-2005 Adi Oanca <adioanca@nowhere.fake>

cleanup

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


# 88820e72 28-Oct-2005 Adi Oanca <adioanca@nowhere.fake>

the new clipping code uses the same mechanism for updating frame/bounds, so we don't need some things anymore.

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


# a5cd1aee 20-Oct-2005 Adi Oanca <adioanca@nowhere.fake>

small checkin to make the new clipping code work if one desires

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


# f2f3ee8f 17-Oct-2005 Adi Oanca <adioanca@nowhere.fake>

Undid my last checkin

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


# 908915fb 15-Oct-2005 Adi Oanca <adioanca@nowhere.fake>

This change should've been checked in for well over a week, back when I activated the NEW_INPUT_HANDLING define. Sorry about that!

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


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

Fixed keyboard navigation; it should now behave pretty much like R5 AFAICT:
- moved standard keyboard navigation into the BView::KeyDown() hook
- the window now only handles tab+option/command key
- B_COMMAND_KEY triggers group jumping, not B_CONTROL_KEY (that activates the switcher,
but directly in the app_server)
- fixed broken group navigation: (modifiers & B_COMMAND_KEY & B_SHIFT_KEY) is different
to (modifiers & (B_COMMAND_KEY | B_SHIFT_KEY)) and is just never true with these
constants.
That allows the tab key completion to be used again in Terminal.


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


# 18b5424c 24-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Implemented BRoster::ActivateApp().
* Added the respective case statement in AppServer::DispatchMessage().
The code that actually activates the app is still missing.
* Removed the remnants of the old way of notifying the registrar about
what app got activated (the activated client window did that).



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


# 4821aac3 18-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

The window is not supposed to resize the top level view. This removes the
"look-through" area in Terminal, and probably ShowImage as well.


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


# 39d30137 18-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

A call to SetSizeLimits() can change the window frame, so it's now updated, too (a separate FrameResized() message is sent anyway).


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


# 3f319b33 10-Jul-2005 Michael Lotz <mmlr@mlotz.ch>

Some cleanup, some removed typos, some unification, some fixes and some added todos. Most of it related to client-server communication. Apps that rely on BFont stuff should work now (StyledEdit, Fonts, Keymap, Menu, ...). Or should not hang/quit at startup at least.

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


# 32d7b6cf 09-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

BWindow::SetDefaultButton() crashed when setting another default button.

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


# 7dc436d8 07-Jul-2005 Stephan Aßmus <superstippi@gmx.de>

usability improvements to scrollbar, sorry had no time to include all of Stefanos drawing code yet, other visual improvements

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


# d520c103 06-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

We must not delete the server window's port...


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


# b93d2480 05-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Now drops into the debugger if the window/looper is still locked in task_looper().


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


# 2b1246d9 05-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed AS_WINDOW_TITLE to AS_SET_WINDOW_TITLE.
Fixed handling in ServerWindow as stippi's latest commit broke it.
It's now properly done with a separate ServerWindow::SetTitle() method,
that will also take care to rename the window's thread.
Changed naming the window thread in the app_server to "w:<team>:<title>".


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


# 2e6a5805 05-Jul-2005 Stephan Aßmus <superstippi@gmx.de>

MenuField layouts the menu bar better with respect to fDivider, it aligns better with other controls. fDivider in TextControl is an integer number now, small fix and small cleanup in Menu, Window::InitData takes an optional BBitmap token to construct an offscreen window, fixed PrivateScreen IndexForColor, View prevents being located at fractional coordinates as in R5, BBitmap unlocks its offscreen window since it is never Show()n and needs manual unlocking, fixed Slider offscreen window mode and improved triange thumb drawing, ScrollView would not crash when passing a NULL target just for kicks, the private MenuBar class now implements Draw to draw itself a little differently inside the BMenuField (dark right and bottom side) - though how it currently sets the clipping region prevents the text controls to draw in Playground, needs fixing

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


# 173c6e95 02-Jul-2005 Adi Oanca <adioanca@nowhere.fake>

Fixed resizing/moving using the new clipping code. Stephan (I know I wrote about these changes in Layer.cpp) I saw the changes you did at how B_VIEW_RESIZE/MOVED are handled. This might break compatibility with R5. I think you guys should discuss this.

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


# 41c71993 01-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed SetLook() (is not implemented server-side, though).
Finally got the thread rename code right under R5 8-)


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


# bb1336b4 28-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Some refactoring and cleanup:
- renamed some members and methods to fit our style guide
- moved removeSelf() to RemoveSelf() (as those two are essentially
the same), and fixed it on the way: the state of the child views
is now also updated by the new _UpdateStateForRemove() method
- Moved BWindow::sendPulse() and activateView() to BView::_Pulse()
and BView::_Activate()
- some minor stuff

This also fixes the broken previous commit - I forgot to update
View.h; this update contains the previous changes as well. Sorry
for the inconvenience.


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


# 80a230b1 28-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Rewrote the push/pop state and ViewAttr stuff:
- it now seems to work finally correctly
- renamed ViewAttr to ViewState and put it into the BPrivate namespace
- some refactoring (moved some private BView methods to ViewState)
- renamed AS_LAYER_MOVETO/RESIZETO to *_TO (note the underscore)
- exchanged BView::originX/Y with fParentOffset (BPoint)
- divided AS_LAYER_GET_COLORS into separate ones for high/low/view color
- BView::SetPattern() now actually works as expected (ie. updates
only if necessary)
- exchanged the ViewAttr::flags with ViewState::valid_flags which inverses
the previous logic (which wasn't even used consistently)
- fState was initialized twice (incorrectly by the ViewAttr constructor,
and then again correctly by initCachedState()) - now the ViewState
constructor does the job alone, but correctly
- BView::PushState() no longer resets the state (it did so only locally
anyway...)
- cleanup


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


# c8e7f53e 27-Jun-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Radically culled the list of BApplication friends and introduced a
BApplication::Private class for accessing relevant parts.
* Pulled the app server connection and IK initialization out of
InitData() into a new method _InitGUIContext() and introduced a private
constructor that allows to avoid this initialization. This will be used
for servers that don't have GUI respectively want to init the app server
connection later.


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


# 85bd83a7 27-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

AS_CREATE_WINDOW now also gets the actual frame width and size limits of
the window on server side - ie. if the app_server could not create a
window of the size requested, BWindow::fFrame will still be correct
(and the size limits will mirror actual decorator limits).
Renamed fMinWindHeight and friends to fMinHeight and so on.


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


# 5727f0cf 27-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

B_WINDOW_RESIZED sends int32 values, not floats.
Made message parsing more robust for a lot of messages.


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


# 84d9f25a 26-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

The thread renaming was broken under R5. Cleaned it up a little.


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


# d2e5d360 23-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

fMenuSem was not initialized, and therefore, the window tried to delete some
arbitrary semaphore on destruction.


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


# 8eee00f6 22-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

No longer draws hidden views (the app_server still handles them wrong, though,
when they are hidden while being attached to the window).
DrawAfterChildren() is now called at the appropriate place.


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


# 4d670342 15-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

a new graphics state is pushed before calling BView::Draw() and popped after it. So any state changes you do in your Draw() function will be forgotton when you're done, as on R5. I have not done a lot of testing for bugs in the state stack within the app_server though...

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


# dd10337f 14-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed BAppServerLink to AppServerLink, BPortLink to PortLink, LinkMsgReader
to LinkReceiver, LinkMsgSender to LinkSender, and put everything into the
BPrivate namespace.
Made AppServerLink a cheap object - it will use the applications receiver/sender
and not create its own buffers.
Fixed broken communication stuff here and there (mostly Font.cpp).
Put the newly introduced set|get_system_colors() into the BPrivate namespace -
please don't introduce private functions into the public namespace!!!
Also fixed their broken communication use, as Darkwyrm obviously forgot about
it again: the sequence Flush(); GetNextMessage() without error checking is
purely wrong and can make the app hang and/or crash! :-)
Other minor cleanup.
The input_server used some test mode with the haiku build target which is
probably wrong.
Hopefully I did not forget anything this time.


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


# aa6f42c9 12-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

DispatchMessage() is called with the looper already locked, so we call fLink->Flush() directly, which does not lock it again. Changed some TODO to be more informative, removed one.

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


# 9b7978ff 11-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

No need to Lock()/Unlock() as Flush() does it already. Sync() wouldn't have unlocked the window in case FlushWithReply() wouldn't succeed.

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


# 56efd1ac 11-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

Sometimes I have seen crashes in BWindow::determine_target(), and this could very well fix it.

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


# 95c58faa 11-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Now we flush the command buffer after handling a B_PULSE message. This fixes the PulseTest (and probably some other things).

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


# 75936a02 07-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

BPortLink now has a FlushWithReply() method itself.
BPortLink::AttachString() now accepts a length argument, and will no longer
send a terminating null byte; LinkMsgReader::ReadString(), however, will
make sure the string read is null terminated.
Changed client communication code to use FlushWithReply() instead of Flush()
and GetNextReply() - there were many bugs and shortcomings in the code, I
hope I've fixed them all.
Converted ClientFontList.cpp to our coding style (but not completely, the
class members are missing).
Some more cleanup - I hope Adi will adopt our coding style one day!


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


# 442992bf 07-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

fixed some pretty bad bugs that prevented menus from working (they now do): The BMessage* in AddShortcut is taken in responsibility by the BWindow, so we cannot directly use the message from BMenuItem, the be_app was locked in InitData but never unlocked, it fixes BMenus only working once, and who knows what else it fixes. A little cleanup with _BCmdKey usage, also note that it is inefficient to RemoveItem()s from a list in the destructor of any class using a BList as data container! Simply delete the items and be done with it. The BList destructor will take care of the rest and free its storage in one go.

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


# e17b33e5 05-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

The window was removing the app_server connection too early, and thus hang in Quit().
Removed the stopConnection() method.
Cleaned up header a bit.


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


# 59345e26 03-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

huge cleanup, support for SetSizeLimits, support for truncating strings, numerous decorator bug fixes, Layer does not draw when view color is B_TRANSPARENT_COLOR, cleaner dispatching of mouse events to the WinBorder in RootLayer, commented the char map selection in the font server, as it seems glyph lookup by unicode index works much better with the default map

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


# b9b38bc7 03-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed build with debug enabled. Renamed a static variable.

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


# 38b35d9c 29-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

BBitmap now uses the correct (private) BWindow constructor. Partially implemented that constructor. Fixed another typo in BView, verified and removed some TODOs

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


# 87ab5d5c 23-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Now we delete the menu semaphore in the window's destructor

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


# 25500bdf 19-May-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed BWindow::UpdateIfNeeded() by moving the code from BView::GetMouse() over.
GetMouse() will now just call UpdateIfNeeded().


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


# bcd8a1fa 18-May-2005 Axel Dörfler <axeld@pinc-software.de>

Converted Window.cpp to our coding style guide and (unfortunately) fixed a
myriad of small bugs here and there, as well as some very odd coding techniques:
- the "Minimize" property was not handled
- the "Minimize" property was not settable
- the property/scripting stuff was horrible, anyway
- there are more and better error codes than B_ERROR (could someone tell the
app_server guys? :))
- added some ToDo items here and there
- and much more I don't remember


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


# 3405fff2 18-May-2005 Axel Dörfler <axeld@pinc-software.de>

Implemented private function BWindow::DequeueAll() which reads all pending
messages from the port.
BView::GetMouse() now calls this function if it was called from the window's
thread and thus blocking the message loop.


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


# ad6b4804 16-May-2005 Stephan Aßmus <superstippi@gmx.de>

Work in Progress. The server keeps the client window up to date on layer movement/resizing. This fixes quite a few problems and brings support for FrameMoved and Resized hooks. But implementing it this way has its own set of problem, most importantly: When a BView calles Window()->CurrentMessage() in its FrameMoved/Resized hooks, it will see something very different from what it would see in R5. This needs to be fixed, but I have not had a good idea how to do this other than faking the current message in BWindow, which I didn't look into.

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


# d557af5b 16-May-2005 Stephan Aßmus <superstippi@gmx.de>

Fixes to my fixes of BView::MakeFocus(), the previous focus BView needs to be unfocused of course so the derived classes implementation gets called. Simplified BWindow::setFocus(). BView calls FrameResized() and FrameMoved() if it has no parent, I don't know how R5 handles it, but I added a TODO...

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


# 7bdfb0d9 07-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added handler for _MENUS_DONE_

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


# fc726990 03-May-2005 Stephan Aßmus <superstippi@gmx.de>

added some safety checks, cosmetic changes - please note that it is safe to call delete with a NULL pointer, unlike free(), so please don't clutter the code

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


# 1596a167 28-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

work around for layers not being moved that have not yet been added to the tree. See WinBorder::MoveTo for the explaination. The same problem should be at other places and most likely for normal views as well. This fixes BWindow::MoveXX() when it is not yet Show()n

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


# 9715a3e1 27-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

fixed BWindow::MoveXX(), BWindow::ResizeXX() and BView::ConvertToScreen()

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


# 35055741 27-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

Added some TODO comments in Window.cpp, improved coordinate conversion in View.cpp. I'm not sure if this really works correctly, I need to write more tests. The scrolling test actually does more of what it is supposed to. At least the scrolling properly follows the mouse now. Missing are the movement of child views, the rebuilding of clipping, and I think that the scrolling needs to be synced to update requests having been fullfilled, or else some parts of the View will be CopyBits()ed which have not been drawn after having been scrolled into view by previous calls to ScrollBy(). Any insights appreciated.

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


# 28930a12 27-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

small changes and fixes here and there

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


# 6141cc1d 21-Apr-2005 Adi Oanca <adioanca@nowhere.fake>

Adjusted SetFeel() to current server implementation

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


# e86740b6 14-Apr-2005 Adi Oanca <adioanca@nowhere.fake>

Forward message to the handler set inside task_looper() no to fFocus

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


# 94b849e1 14-Apr-2005 Adi Oanca <adioanca@nowhere.fake>

No more B_MESSAGE_NOT_UNDERSTOOD on B_UNMAPPED_KEY_DOWN, B_UNMAPPED_KEY_UP, B_MODIFIERS_CHANGED events

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


# be9241bf 10-Apr-2005 Adi Oanca <adioanca@nowhere.fake>

Added server support for Workspaces() and SetWorkspaces()

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


# 9f7e77bd 31-Mar-2005 Adi Oanca <adioanca@nowhere.fake>

Forgot a warning message

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


# 52bd9786 31-Mar-2005 Adi Oanca <adioanca@nowhere.fake>

Send only one AS_BEGIN/END_UPDATE message, not for every view

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


# 3c46b748 27-Mar-2005 Michael Lotz <mmlr@mlotz.ch>

Remove debug leftover.

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


# cd970020 27-Mar-2005 Michael Lotz <mmlr@mlotz.ch>

Implement the BWindow::task_loop again. I know that this is code duplication, but look at
the TODO item for an explanation. We could do this as a hack in Looper.cpp though.
Also implement the determine_target function (incomplete).


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


# 27e3da2f 26-Mar-2005 Adi Oanca <adioanca@nowhere.fake>

BWindow's frame events hooks work now. Frame gets updated on window move/resize.

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


# ed16bb78 26-Mar-2005 Michael Lotz <mmlr@mlotz.ch>

Fix KeyDown/KeyUp calls so that we don't always get numBytes = 0.

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


# 642d7ca9 21-Mar-2005 Adi Oanca <adioanca@nowhere.fake>

Implemented BView::SetEventMask()

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


# 494d1b2a 17-Mar-2005 Adi Oanca <adioanca@nowhere.fake>

This fixes a problem with window's contents not being redrawn after a Show(), Hide and Show() again

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


# f51f1dda 05-Mar-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed some weird includes (no need or even support to specify "posix" as part of the include path).


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


# 7b76dd80 06-Feb-2005 Adi Oanca <adioanca@nowhere.fake>

mouse & keyboard messages now use the full power of application_kit


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


# 79c8040e 03-Feb-2005 Adi Oanca <adioanca@nowhere.fake>

BView::MouseUp/KeyDown/KeyUp() hook methods are called for the BView for which the action takes place


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


# 0e835651 03-Feb-2005 Adi Oanca <adioanca@nowhere.fake>

BView::MouseDown() finally gets called


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


# 6e8a11dd 21-Jan-2005 Adi Oanca <adioanca@nowhere.fake>

Keyboard messages are dispached to BWindow's handler if no focus view


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


# e09fd76f 06-Nov-2004 DarkWyrm <darkwyrm@gmail.com>

Added some changes for the new mouse wheel support


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


# f9ed3ba7 21-Aug-2004 DarkWyrm <darkwyrm@gmail.com>

Fixed a stupid mistake in the message to create a window


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


# 38e110b1 08-Aug-2004 DarkWyrm <darkwyrm@gmail.com>

Client-server messaging fixes


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


# f073f5d1 02-Aug-2004 haydentech <haydentech@nowhere.fake>

Fix 2 instances of mismatched locking


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


# 3ceb31b9 30-Jul-2004 DarkWyrm <darkwyrm@gmail.com>

Pahtz's changes from PortLink/BSession/PortMessage/PortQueue to BPortLink


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


# 26b54010 14-Jul-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added implementation of _set_menu_sem_() to Window.cpp (should it go to a different place ?), thus fixing the build (at least here, I hope I didn't forget anything else).
Thanks to Bill Hayden for reporting and sorry again for the trouble.
Changed a comment in PopUpMenu.cpp


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


# 7c680a35 05-Jul-2004 Adi Oanca <adioanca@nowhere.fake>

Implemented a method for the update process. Rearanged some code.


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


# 71786a38 27-Jun-2004 Axel Dörfler <axeld@pinc-software.de>

Added missing private AddShortcut variant.
Minor style update.


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


# 5b7dc94c 19-Jun-2004 Adi Oanca <adioanca@nowhere.fake>

chnaged a mesage code


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


# 5929c56e 18-Jun-2004 Adi Oanca <adioanca@nowhere.fake>

::MoveBy() fixed.


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


# 1889be2a 18-Jun-2004 Adi Oanca <adioanca@nowhere.fake>

hidden state was wrongly reported


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


# a3c6cfb7 17-Jun-2004 Adi Oanca <adioanca@nowhere.fake>

Changed internal protocol. Ha ha. Just deleted a line. :-)))


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


# f23d8d62 16-Jun-2004 Adi Oanca <adioanca@nowhere.fake>

Major code cleanup


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


# d7113e23 16-May-2004 Adi Oanca <adioanca@nowhere.fake>

modified Resize methods


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


# 7a71a81c 03-Apr-2004 Adi Oanca <adioanca@nowhere.fake>

modified the way top_view sends its data to app_server. It now send _all_ is data


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


# a7d9589f 28-Mar-2004 Adi Oanca <adioanca@nowhere.fake>

* Modified a little the protocol for AS_LAYER_CREATE_ROOT message. Replaced PortLink with BSession. Was
necessary!


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


# 1660ace4 17-Jan-2004 Adi Oanca <adioanca@nowhere.fake>

added a member in a message


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


# 7473eb7d 16-Jan-2004 Adi Oanca <adioanca@nowhere.fake>

added a memeber to a server message


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


# 533c9ed8 13-Jan-2004 Adi Oanca <adioanca@nowhere.fake>

changed and if statement in AddToSubset


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


# 07e5e0d1 12-Jan-2004 Adi Oanca <adioanca@nowhere.fake>

modified so use BSession again
various fixes especialy regarding app_server connection


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


# 5936e650 07-Dec-2003 DarkWyrm <darkwyrm@gmail.com>

Converted a lot of BSession use to PortLink where streamed messaging is not appropriate


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


# 60c2633d 06-Dec-2003 DarkWyrm <darkwyrm@gmail.com>

Removed use of BSession in constructor - conversion to using a BAppServerLink.
BSession streams are not meant for this kind of use


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


# 84e57fc9 10-Nov-2003 haydentech <haydentech@nowhere.fake>

Fix line array bugs, missing breaks, gcc3 incompatibilities, and a few typos


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


# da024ab3 24-Sep-2003 Adi Oanca <adioanca@nowhere.fake>

*modified ReadRawFromPort() and ConvertToMessage() methods to use BSession class.
*modified/added B_VIEW_(MOVED/RESIZED) handlers in ConvertToMessage()/DispatchMessage()


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


# b81089db 15-Sep-2003 Adi Oanca <adioanca@nowhere.fake>

* made fLastViewToken member equal with top_view's token. This avoids an unnecessary message to be sent to app_server.
* added some debugging code?
* other changes...


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


# c73714db 08-Sep-2003 Adi Oanca <adioanca@nowhere.fake>

some appserver connection code


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


# 072a83e4 03-Sep-2003 Adi Oanca <adioanca@nowhere.fake>

changed to avoid some compiler warnings


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


# bf17b6ac 31-Aug-2003 Adi Oanca <adioanca@nowhere.fake>

Modified to use the new BSession class


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


# dfa226a1 24-Jul-2003 DarkWyrm <darkwyrm@gmail.com>

WindowLookToInteger and WindowFeelToInteger return the values specified in R5's Window.h


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


# 19de2978 11-Jul-2003 shadow303 <shadow303@nowhere.fake>

Updates for changes in PortLink & PortMessage


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


# 3bc6d6c5 04-Jul-2003 shadow303 <shadow303@nowhere.fake>

gcc 3 fixes


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


# 3aa0c906 25-Jun-2003 haydentech <haydentech@nowhere.fake>

Fixed a crasher in setFocus() and some dead code in ResizeTo()


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


# 6ef98483 23-Jun-2003 DarkWyrm <darkwyrm@gmail.com>

Removed some bugs to allow the server to run. We can now display (but not play with) a real BWindow!


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


# 40ceba30 03-Jun-2003 haydentech <haydentech@nowhere.fake>

Janitorial work and gcc3-related fixes


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


# 1b739004 17-Apr-2003 DarkWyrm <darkwyrm@gmail.com>

Checkin for Adrian Oanca


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


# f8931e92 30-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Removed a linker error caused by the restructuring of the BMessage sources


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


# df8d45f7 23-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

A few bugfixes to allow for simple app_server testing


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


# 2be975a1 19-Mar-2003 ejakowatz <ejakowatz@nowhere.fake>

_get_object_token_ has found its permanent home in AppMisc.h, which the
other files were modified to include.


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


# c503a7bc 18-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Added BHandler tokens to app_server communications setup


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


# 6c69f6e9 14-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Check-in for Adrian Oanca - some serious code coming in!!


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


# 2d51f602 12-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

More tweaks to talk to server betted in the constructor
Fleshed out a couple message-handling routines to better be able to debug server


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


# ea4ea977 12-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Window now talks nice-nice to app_server


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


# 0d97724c 11-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Modified to utilize member PortLink instead of creating new ones


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


# 364bb57e 24-Feb-2003 DarkWyrm <darkwyrm@gmail.com>

Updated sources to reflect changes in <ServerProtocol.h>


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


# 2dc78c1f 24-Nov-2002 DarkWyrm <darkwyrm@gmail.com>

#Include tweaks


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


# 380f5292 23-Nov-2002 DarkWyrm <darkwyrm@gmail.com>

Adding initial BWindow implementation by John Hedditch


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


# 0619f34b525cc9dae8febf61cdc30a371496116b 04-Nov-2012 Oliver Tappe <zooey@hirschkaefer.de>

Add BWindow::HasShortcut()


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


# 9be774b553296a712704078314f2291ae5fc352c 30-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Compilation and 64-bit fixes to libbe.so sources.

Fixed the usual issues - printf format strings, uint32 instead of
addr_t, etc. One thing that isn't so nice is several places where
BList is used to store (u)int32, these require a double cast to addr_t
then void* to silence a warning on x86_64.


# 3cee15aac2ef8c6ae8975d9add34c36aa4224c29 28-Mar-2012 John Scipione <jscipione@gmail.com>

Keymap changes from recent activity. No AltGr yet.

Below is a mostly complete summary of the changes in this commit.

* Set the DeadKeys for the US-International Keymap to use the Option map.
* Rename American keymap to US
* Update the US, US-International, and United-Kingdom keymaps to take
out unneeded spaces in the option layer. Also updated the dead keys
and some other keys on the US-International keyboard to use UTF-8
characters rather than there ASCII equivalents when different.
* Make the Option key fall-through when there is no mapping in the Option
table. Option is for special characters, if none, print the regular one.
This is mostly meant for the US keymap which has an empty option map. But
also so that you don't have to repeat the normal, shift, and caps maps in
the option map needlessly. Although the keymaps are still not empty in
some cases that it could be like numpad keys and space.
* Update the /bin/keymap app to use fputs() instead of printf() when there
is no actual formatting taking place. I've gotten into trouble for doing
this before and it is faster to not process the string unnecessarily.
* Also several 80-char limit style fixes and updated comments.
* In Keymap class Reorder the modifier keys to match the keymap files.
Put B_CONTROL_KEY check above B_OPTION_KEY. Neither change has any effect,
they are purely aesthetic.
* Update DumpKeymap() method to use the abbreviated modifier letters so it
will fit in your 80-char wide terminal.
* Tiny style fix in InputServer
* 80-char limit style fix in BWindow and add a comment that the shortcut
gets eaten in the case of Cmd+Q
* Implement IndexForModifier() in KeyboardLayout, although I am not using it.
* Take Caps Lock out of the Modifier keys window because I couldn't get
it to work the way I wanted it to.
* Move key roles to the left column, and the key label on the left. Add column
header labels. Thanks Rimas!
* Add validation and improve marking menu options. Add a 'Disabled' option
to control, option, and command menus to disable the key. Make the key
role text grey if the key roles is disabled. Validation ensures that you
cannot repeat the same key twice in the Modifier keys window since that
won't work. You can't define 2 sets of option keys even if you really want
to. You can disable your control, option, and command keys if you
want, but that is not recommended.
* Rename kUpdateModifiers to kUpdateModifierKeys message to differetiate
it from kUpdateModifier.
* Add shift key to Modifier keys window, use the stop icon instead of the
warning icon to indicate conflicts.
* Allow the Layout system to control the size of the Modifier keys window
again, set the width's of the key role lables to the widest, set the width
of the menu fields to take up the rest of the space minus room for the
conflict views. I didn't like it that the Modifier keys window would change
size based on what options you had selected in the menu fields. Now it
doesn't, but, the layout system still makes it all fit.


# 958ac01d5f1bcbd137d482bcf18d51d0ba624e1a 21-Jan-2012 czeidler <haiku@clemens-zeidler.de>

Reconnect window and recreate all views.


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

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


# 221f5018b90cdd78b0139985a0b59248ec91f562 11-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Revert part of r43166 that was included accidentally. This resulted in
incorrect behavior while processing certain kinds of messages, and
consequently deadlocks in some apps. Fixes #8101.



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


# 85c30aeccb4d4c0ac11c5bf46ff41ed48e5ec630 03-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Remove extraneous code with respect to telling a menu to close which was
breaking various cases where menus coexisted in a window with a view which
was using event masks:
- If one invoked the menu via, e.g. a BMenuField, and then tried to choose
an item on it, the mouse down would get captured, the menu would be
closed, and the mouse event would be thrown away without ever reaching
the event mask view.

- Furthermore, since the menu was told to terminate early, it would decide
that the user hadn't actually chosen that item (the escape key case),
and never actually invoke it.

Fixes the menu fields in the mouse preflet being broken.



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


# 14ac1ee9620bcd06aa0a3730d0d66897eff5f6f1 31-Oct-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Tweak the notification window again :
* Spacing of the bprogressbar is now 8pixels on each size
* Remove the useless window tab for now

Also fix DecoratorFrame() again as BORDERED_WINDOW didn't work with it either.


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


# ee298c8b81c0aa2b1c683c5c5b249a2c49119d5e 06-Aug-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Fix DecoratorFrame() for kLeftTitledWindowLook windows
* Use it in notification window for better positionning.
Thanks augiedoggie for reporting the problem !


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


# 77f593de386af0da168b31b2f754280ea64b2679 04-Aug-2011 Jérôme Duval <korli@users.berlios.de>

Patch from X512 (ticket #7408): Don't notify input server of focus change if window is not active.


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


# b0b4ce7e95ebdc39e772920cb3df2996506b5334 03-Aug-2011 Jérôme Duval <korli@users.berlios.de>

Patch from X512 (#7408): only send input method aware messages for active windows


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


# 48ae3e3808d235e6bea5efdf254eefaff892920d 27-May-2011 Axel Dörfler <axeld@pinc-software.de>

* Followed Ingo's suggestion, and added a BWindow::Layout() method.
* Changed ShowImage to use that function.
+alpha in case Ingo gives his okay :-)


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


# 58bee544222b1124a21e1910d1caf2622cdac75e 19-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Renamed _CheckSizeLimits() to UpdateSizeLimits() and made it public.


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


# 1d6c7b6cb6f46c2672074ff137a18833d4dd3041 17-Aug-2010 Alex Wilson <yourpalal2@gmail.com>

Big change deriving BLayout from BLayoutItem, and allowing viewless BLayouts.
a few highlights:
* BLayout now derives publicly from BLayoutItem
* Added BAbstractLayout class, which our layouts now derive from
* updated layout builders to avoid creating views when they don't need to
* updated layout classes
* updated AboutSystem to fix a little regression
* more details on #6407
* please tell me about any regressions, I've tried to find them all, but some
may have slipped by.


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


# 0c9f5a026f4ccc18b4e8e51b8d907818e3cafa3b 25-Jun-2010 Wim van der Meer <wpjvandermeer@gmail.com>

* Modified PtrScr key behaviour:
- No modifiers: take a screenshot with zero delay and launch the GUI
- Shift-PrtScr: Silent screenshot using the saved GUI settings
- Ctrl-PrtScr: Take a screenshot using the saved GUI settings and copy the
screenshot to the system clipboard
* A few locale related changes (I am not sure how this works when a class is
shared between two applications, I hope I got everything right)



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


# 3417d2a90ffb7003567e39ae83924364283929f1 08-Jun-2010 Wim van der Meer <wpjvandermeer@gmail.com>

* Rename "ScreenshotApp" to "Screenshot", rename its signature from
"application/x-vnd.haiku-screenshotapp" to "application/x-vnd.haiku-screenshot"
* Rename "Screenshot" to "screenshot", rename its signature from
"application/x-vnd.haiku-screenshot" to "application/x-vnd.haiku-screenshot-cli"
* Move screenshot from /system/apps to /bin


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


# 5396d90d16af3e8eeba88f4933841f3016a85f4b 07-May-2010 Axel Dörfler <axeld@pinc-software.de>

* Made zooming to full screen center the window when the window cannot be made
full screen (due to size restrictions).


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


# 139aacf4067f8642ccb42096a01b9e33b76e0f60 06-May-2010 Axel Dörfler <axeld@pinc-software.de>

* The window was now always taken to the new workspace with Ctrl-Alt-arrow;
lazy debugging left over that closes ticket #5675 again.


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


# 0a51dbde98d0d46c22e46a455ee04398e9781db7 02-May-2010 Axel Dörfler <axeld@pinc-software.de>

* Unified the Desktop and ServerApp AS_ACTIVATE_WORKSPACE to work in the same
way.
* Use that newly exposed feature of taking the focus window to the new workspace
when using the Ctrl-Alt-Shift-Arrow shortcut.
* This fixes #5675.


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


# 43a7eb6ca5913a90baedf68b9939b7f7e1ae46df 21-Feb-2010 Stephan Aßmus <superstippi@gmx.de>

Add comment explaining why MenusBeginning() is invoked before handling key events
with the command key pressed.


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


# 85874d8dd3477eb2fe765d0f5a7fb0b407657dc3 04-Feb-2010 Stephan Aßmus <superstippi@gmx.de>

When a Window is created for holding BViews attached to an offscreen bitmap,
always behave as if within a transaction. Otherwise all drawing calls to such
BViews wait for the server to finish the request. This change gives a tremendous
speed boost for these situations and is compatibly with BeOS, since there you
also had to call Sync() before drawing a bitmap that was painted with attached
views.


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


# 5f341c3847ed5b129456041dcf8ee3ae3541fe19 29-Nov-2009 Philippe Saint-Pierre <stpere@gmail.com>

Reverting r34335. Wrong location of my "B_NOT_MINIZABLE" check.



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


# 2c9bea98b97813919f10261f0f18d9bd5d0dc58c 28-Nov-2009 Philippe Saint-Pierre <stpere@gmail.com>

Make BWindow honor the B_NOT_MINIMIZABLE flag. Fixes ticket #4337.


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


# 09749e95dc8747b3850cb5d1a3bded774d0880cc 18-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a BWindow::InViewTransaction() that determines whether or not the
window is currently updating its drawings as suggested by Stippi.
* Add this method to decide whether to call _FontChanged() in
BListView::SetFont().


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


# 289d85d2acc79e4d19cfa36049028f1fa8212061 18-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* BWindow::SendBehind(NULL) will now send the window to back.
* Added shortcuts ctrl-alt-F to get a window to front, and ctrl-alt-b to move it
to the back.
* Updated the user guide with these shortcuts, and also explained the missing
"single click to bring window to front" behaviour.


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


# 5a0982b580d01a31ccd4c545a369be05691ffee1 16-Nov-2009 Jonas Sundström <jonas@kirilla.com>

Spelling

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


# 80351b4d41d0aeba7e2509d24e263b06bd1bce1a 21-Oct-2009 François Revol <revol@free.fr>

- this should fix gcc2 build, sorry ;)
- style fixes.


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


# 223ae47d9990fd0cce87b48d76b6b13c130bc365 20-Oct-2009 François Revol <revol@free.fr>

Extend the Ctrl-Alt-arrows shortcuts to also move the current window when shift is held, as on Gnome.


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


# 81c431d23d8cc3d40ec1a9f3fdbcd45faba73839 05-Oct-2009 Michael Lotz <mmlr@mlotz.ch>

Include the terminating 0 byte when adding as string type. Otherwise someone
reading the message as an actual string will run into problems.
Should fix #4697.


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


# 8a5e590d5e01f1d3221dc5351f78f73268b9b568 28-Sep-2009 Stephan Aßmus <superstippi@gmx.de>

Work based on a patch by Joshua R. Elsasser:
* Some key-sequences cause \0 chars in the "bytes" data which is supposed to
be passed to BView::KeyDown() and BView::KeyUp(). Therefor, one cannot use
string methods for adding/extracting the data to/from the events. For
example, Control-Space now works in the Terminal.

Thanks a lot for the original patch, Joshua!


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


# 4aa6ec093bd7e397fc8cedec68786056b4861eb6 02-Sep-2009 Axel Dörfler <axeld@pinc-software.de>

* IsMinimized() now locks the window. This should fix bug #4274.


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


# 19bce7226ad66127e6639b89959c469f223a460c 22-Aug-2009 Ryan Leavengood <leavengood@gmail.com>

Remove the forced resizing to preferred size when CenterIn is called, and
instead just check if the size limits need to be set. The code that previously
did this when processing the B_LAYOUT_WINDOW message was extracted into a
private method, which is called from both places.

This may be slightly wasteful in some cases (since the size limits may be set
multiple times), but it is definitely needed because without it both of the
current test apps (DiskProbe and Screenshot) did not have properly centered
windows.


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


# b0586d610aef2303e09c095164853e54af7b4971 22-Aug-2009 Ryan Leavengood <leavengood@gmail.com>

Remove useless BRect* version of CenterIn, make remaining version take a const
BRect reference.


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


# 2ff62714d017b620b7d452a686f3667662b143f2 22-Aug-2009 Ryan Leavengood <leavengood@gmail.com>

Finally implemented BWindow::CenterOnScreen, with associated CenterIn(BRect)
methods as well as Size(). To avoid the problem of centering the window before
it has been resized by the layout system, I force the resizing early. If there
is a better way to do this or some way to avoid doing it repeatedly, let me
know. But I figure the Center* methods should not be called that often.

Updated Screenshot and DiskProbe to use this new method as a test. It certainly
cleaned up DiskProbe. I will update other code over the next few days (if
anyone wants to help, please do :)


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


# 1f3bec8961ee7e4c087e64420902d984f3f5c10d 21-Aug-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

removed resolved TODO comment


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


# 87da7984dc830d44b9d611680d84d474726d861b 19-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Contrl-~ now switches between application windows. This is handier than the
mechanism used in BeOS, that is to press Control+Option-Tab (which didn't
work on Haiku, though).
* Did not change the window switch logic, though, so it's still not really
nice.


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


# 5b0a5c36ad2b117af5d0a7c0cc73539f46fcd60b 19-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Our jump-to-next-group never worked, and since no one complained, option-tab
now takes over this role (leaving Alt-Tab) to the application.


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


# 99452e33a88b77b7e8c763af2a5fab098e6ae817 10-Aug-2009 Jonas Sundström <jonas@kirilla.com>

Cleanup

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


# a57dddca061a11aeeee9e47ae9e44c3559762d6a 10-Aug-2009 Jonas Sundström <jonas@kirilla.com>

Add TabFrame window property.

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


# 8318af01b99f0c1c6622b7bf33db02794b7eaa20 03-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a basic tool tip API, and implementation.
* The BView API can probably be regarded as good enough; the implementation
might need to be improved over time (also, some things as archivability
aren't fully implemented yet). The ToolTip.h header should get public once
finalized.
* Added new B_MOUSE_IDLE message that is sent to a BView after a certain
time has passed (BToolTipManager::ShowDelay()).
* Added small test app (ToolTipTest) that shows what is already working.


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


# 1d6720dc2dbe75f508a29a96db7aea9829a99b77 27-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Don't use B_ZOOM; this does not respect the B_NOT_ZOOMABLE flag, same problem
as with B_MINIMIZE. This fixes bug #4134.


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


# 47d9ed62d33e873f57fb672e288d0dde706ce354 27-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Added AS_GET_WORKSPACE_LAYOUT to get the number of columns/rows of the
workspaces.
* Added shortcuts Ctrl-Alt-{Left|Right|Up|Down} to switch to adjacent
workspaces.


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


# 6d52606f4bc36b56ebbb26f24085fb201809ea00 27-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Don't use the B_MINIMIZE message for the minimize shortcut (ctrl-alt-m), since
that ignores the B_NOT_MINIMIZABLE flag. Instead, there is now a private
_MINIMIZE_ message (naming like those other ugly private BMessage constants in
AppDefs.h) which honours that flag.


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


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

* Style cleanups.
* Removed former dead print-screen code.


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


# ea603b7af34a9ca51c5fe94bc5dc87f0748e4c25 21-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

Small style cleanup.


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


# 8f24c711026f5a3e370f662cb95a93a1392f6472 20-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

Reverted my change to usage of _get_object_token_(), it already means to use
a cached token... doh! Thanks Axel!


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


# fa0ba1f8558995e2a4ed13b69c95e8402dee8900 20-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

Cache a view's server token. Avoids getting it for every
BView method that contacts the server.


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


# 591bc3f2d99168a9b2a9bdcbda20c47e97a4ff80 28-May-2009 Jérôme Duval <korli@users.berlios.de>

* various fixes identified by gcc4, provided by Joe Prostko


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


# f247113640c6b692023a316913c73a89b04c3a31 31-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

Added DecoratorFrame() method, which returns the outer frame of the window
on screen (ie including the decorator border and tab). Plus the necessary
refactoring as well as some TODO notes about windows with the tab on the left
side.


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


# 68b8f65f337919d92beff339ba404f65470c8047 29-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Reworked r29180 to make _HandleKeyDown() no longer rely on the active window
but if the message was targeted to the focus view. It will now only handle
shortcuts in this case.
* This also fixes bug #3513.


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


# 91f10b0a3689952cff9c7b5dde5da52f24109bea 09-Feb-2009 Jérôme Duval <korli@users.berlios.de>

* it seems we can skip _HandleKeyDown() when not active (keyboard navigation, shortcuts and screenshots).


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


# a13e53fe4fe1a5fdedff7fe9ca52b6a2ce11eb08 09-Feb-2009 Jérôme Duval <korli@users.berlios.de>

* Handles shortcuts only when the window is active. This fixes bug #3414 (and hopefully is the R5 behavior).


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


# 6eb09230bae52bcdf045e1f1920b67205c29adc8 01-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

* Resolve further warnings on GCC4.
* Enable -Werror on GCC4 builds as well (limited to the same selected targets).


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


# 18cd67c76072f825c4a7ba58414771d47fd1bfa2 22-Jan-2009 Michael Lotz <mmlr@mlotz.ch>

Add missing headers (malloc/free, string functions, memcpy, etc. undeclared).


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


# 3dc4e7fa474b1bbb7332746c1b77220f924b346b 15-Jan-2009 Axel Dörfler <axeld@pinc-software.de>

* The move/resize window protocol now uses absolute coordinates rather than
relative ones. This fixes bugs #2658, and #3213; in BWindow::ScreenChanged()
the window does not yet know that it moved on the new screen (when it already
had a position on that workspace).


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


# 860678c2c76d8d090f1a8ee08acd14ebf71f64d8 28-Nov-2008 Stephan Aßmus <superstippi@gmx.de>

At some point, there was some hassle about what coordinate system the "where"
BPoint in a mouse moved message is. Turns out it's different (!) according
to the type of message and this is even documented in the BeBook. I don't
really know if we want to copy this, but since there are apps out there that
depend on this, I am implementing it so that it's compatible with BeOS: In
the B_MOUSE_UP/DOWN case, it's the coordinate space of the target view, in
B_MOUSE_MOVED messages, it's that of the window. That explains a few things...
Clicking into Pe's function popup window should now select the right icon.


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


# 6cf3a9ebf7bd44b294c1def7ac2fc836df5b468a 16-Nov-2008 Rene Gollent <anevilyak@gmail.com>

The previous commit exposed another bug: BWindow::Zoom() incorrectly calculated the max height of the window by only including the border width once. This was previously masked by the fact that the (by default 5) extra pixels were included in its hardcoded default for the height of the tab. Also add the border width to the message returned by GetDecoratorSettings() so Zoom can use the actual value instead of hardcoding it.



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


# ca9a61313ab9fe0376360e2ff19ad59f51c6111e 16-Nov-2008 Rene Gollent <anevilyak@gmail.com>

Resolved a small todo thanks to r28664:
We now ask the app_server for the window tab's height instead of
hardcoding it.



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


# 783d616d08064545650eb10ecfc2dd9f09da917c 16-Nov-2008 Stephan Aßmus <superstippi@gmx.de>

Minor style fix.


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


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

* Replaced some "new" with new(std::nothrow) where appropriate in our base
classes (BView, BWindow, BAlert, BButton - BTextView should be part of this,
too, to make BAlerts work).
* However, it's not that simple, because there is often no way to return an
error. Most of that code obviously assumes to be able to throw exceptions
(it's just not communicated to the caller). Maybe we should just start
documenting exceptions for R1 (and properly use exceptions later on).
* Automatic white space cleanup.


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


# a5a4ec57c56359ee3a144d26a76d3fef8c99c286 04-Nov-2008 Stephan Aßmus <superstippi@gmx.de>

Fixed two more problems with BWindow::FindView(BPoint):
* The function is not supposed to return hidden views.
* After iterating over the child views, the "view" variable was clobbered,
so it didn't work to return the current view if none of it's child views
were hit.


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


# 73ca5aff45a365cc35a8954e4b5486f3a6a300a4 01-Nov-2008 Rene Gollent <anevilyak@gmail.com>

Fixed numerous problems in BWindow::_FindView:

1) If a view contained the point, but had children, that view would never be returned as a result, even if none of the children matched.
2) When converting coordinates to the child's coordinate space, it was using the bounds rectangle rather than the frame. This in most cases had the result that the coordinate was unchanged, and thus messed up the search completely.

This fixes ticket #3000.



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


# d751323939575160b39a145750ddde4eb6f02b39 18-Oct-2008 Karsten Heimrich <host.haiku@gmx.de>

* reintroduce member fOffscreen which got removed in r2917
* check if locking the offscreen window succeeds before calling delete on it
* don't return offscreen windows in CountWindows and WindowAt (works now as on R5)

fixes ticket 1522, 1591, 1946, 2318 and propably more

While creating an BBitmap in BApplication the bitmaps window looper would
be added to the applications gLooperList, thus calling Quit() on that window
and later delete on a stale window pointer in BBitmaps dtor. The Lock() check
would fix the problem, but tests on R5 have shown that BApplication hides the
offscreen window in CountWindows() and WindowAt().



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


# 39fbf5509b8740d9883b61649027478dc8a3ead8 15-Oct-2008 Oliver Tappe <zooey@hirschkaefer.de>

bonefish + zooey:
* Fixed a general problem with respect to overriding of the reserved
virtual function slots: instead of statically invoking the method
that corresponds to the reserved slot on the class that contains the
slot, we now invoke the virtual Perform() method. Perform() then dispatches
the method invocation to the "proper" class, i.e. the highest class in the
hierarchy that actually implements the requested method.
This fixes a crash in apps that use liblayout's MSlider class and
should fix one or other spurious bug with old apps or libraries, too.
* added new header folder 'binary_compatibility' that contains files that
define the method codes and data structures required by Perform()
* looked for and implemented all used reserved virtual slot functions to
invoke Perform() where necessary or to pass on the method call statically
(for slots that were already maintained by Be)


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


# 350b87c7d22c9fccaecd4950e6424fb83563877c 13-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

zooey + axeld + stippi:
Fixed a problem with dispatching B_MOUSE_MOVED messages to views which need
the transit event:
* If the app_server decided to send a B_MOUSE_MOVED to the previous mouse
containing window, it forgot to add the _feed_focus flag, which was a problem
if the message actually happened to contain tokens (views that registered
for events.) On the client side, only those views would receive the message,
while the regular last mouse moved view would not be notified at all.
* On the client side, never change fLastMouseMovedView if the message is not
targeted at the preferred handler. In the above situation, any "registered
for events views" would receive the message first, but viewUnderMouse would
be NULL and then when the regular last mouse moved view received it, it
resulted in the wrong transit (B_OUTSIDE_VIEW instead of B_EXITED_VIEW).


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


# 71ea6c922905bb76862bf956e63ec44728cd14a5 12-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

* Refactored a method for getting the transit from a mouse moved message.
* In _StealMouseMessage(), don't maintain fLastMouseMovedView, instead,
prevent B_MOUSE_MOVED message from being stolen that are important for
detecting transit changes. The point is that some apps (like Tracker) are
shooting themselves in the foot because they steal mouse messages via
GetMouse() in one place, but then rely on sane transit values in another
place. The way it works now, the view in question may get notified of the
same mouse moved coordinate twice, once via GetMouse() and once via
MouseMoved().


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


# eb1466cf86f1a987a3c7eecd156a05ed11d5dc92 30-Sep-2008 Karsten Heimrich <host.haiku@gmx.de>

* use the screenshot app to take a screenshot
* remove libpng and libz dependency in case we build for Haiku



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


# 0cafe2dfb913996075f3a3d6c9bde77449cec65b 26-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

* Fixed a race condition in BWindow::Show(). If it was the first time Show()
was called, the calling thread could be preempted, or simply be blocked on
calling Lock() after running the window thread. The window thread in turn
could be processing messages. In that case, fShowLevel would still have the
wrong value. For example, MediaPlayer would call IsHidden() on one of it's
views, which would then return true for this case. The result was that the
video view was not hidden and a black rectangle was showing on top of the
controls. This may also have caused other similar problems of course.
* fRunCalled was accessed without holding the lock.


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


# 518056893e1fd490099cbf5ace9c0c2b69c698e3 03-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* BWindow::Activate() now also unminimizes a window if necessary.
* Removed superfluous white space.


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


# 84c9d73d7d0f1e612f75c350b6f794df8ec9a62d 18-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

In the B_MOUSE_MOVED message, "where" is supposed to be in window coordinates
while "be:view_where" is in view coordinates. We made the mistake of having
them both be in view coordinates. This caused a problem for example in Vision.
(#2460)


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


# 674c8bc8bb662b66fd27ac3875207dd6427e9012 10-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

Added TODO about a problem that the late mouse moved message dropping code
may have.


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


# dde9faab866c29856ca69a22a09a743502e45e01 10-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

* Made the mouse moved message dropping code slightly nicer to read.
* Don't drop messages which carry an important transit value. (Thanks, Axel!)


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


# bb73c05fd78548cff26204255950b22682101cf0 09-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

* Introduced a new view event mask flag: B_FULL_POINTER_HISTORY which,
when set, prevents any old mouse moved message discarding.
* BWindow::DispatchMessage(B_MOUSE_MOVED) checks the event time of the
message and discards too old events, but only if there is another event
in the queue and the view does not specify B_FULL_POINTER_HISTORY.
* BView::GetMouse() ignores the checkHistory flag passed to the function
in case the event mask specifies B_NO_POINTER_HISTORY.
B_FULL_POINTER_HISTORY on the other hand prevents the dropping of old
messages.


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


# eaa6da1ef750d815d4318870eb24ccabc326c4c8 19-Jun-2008 Stephan Aßmus <superstippi@gmx.de>

Use a flag in BWindow to store whether an update to a view (Invalidate()) has
been requested. The first call to a BView::Invalidate() will flush the link
so that app_server is notified as soon as possible. It makes no sense for
further calls to Invalidate() to flush also, since Flush() is not cheap. This
trick makes Invalidate() about 3.2 times faster, making it a cheaper operation.
I could not see any negative effects, I tested with apps that invalidate
multiple different parts inside a window in reaction to something. Thanks go to
Ingo who had the idea.


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


# 9c1328f0a25257f1195e3ef82b1fc3cddb28a8d3 09-Jun-2008 François Revol <revol@free.fr>

gcc4 fix.


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


# cf1c322756b102ba4165249eab037b01723796ca 08-May-2008 Jérôme Duval <korli@users.berlios.de>

use find_directory() instead of /boot/home/


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


# 6aede71c0c98fc4bced0235ad84abbdcfa422d4f 29-Apr-2008 Ryan Leavengood <leavengood@gmail.com>

Resolve a TODO and fix another ancient bug, #386. Print Screen is now handled
by BWindow, no longer by the app_server. This should stop the "screen freeze"
effect.

This adds a dependency on libpng.so and libz.so to libbe.so. The same
dependencies and the PNGDump code added here can be removed from the
app_server. I am just waiting for a code review of this before doing that.

This implementation still does not give the client a chance to handle it
differently.


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


# e0da34f5c0d92f61553ea8a712261eaa438a3234 17-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

* "where" and "be:view_where" are supposed to contain the same value; dunno
why the latter is then even added, but we do the same thing as BeOS now.
* This fixes bug #2075.


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


# 10f4d0679a8df9f72c2a295b2f2ac80ea776538b 11-Apr-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added a class MenuPrivate to handle access to private BMenu methods.
BMenuItem and BWindow are no longer friends of BMenu, but use this class
instead.


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


# 5c9a6b8c2a16fa2156c18a5fdf6324d53fca113a 06-Mar-2008 Rene Gollent <anevilyak@gmail.com>

As per discussion on haiku-dev, BWindow now always forces the
B_ASYNCHRONOUS_CONTROLS flag. If anyone does encounter an app that
breaks because of this, please let me know, but a few tests with various
apps seem to show no issues.



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


# c3b57150e29e347f67df6f7584cac544c804b2b4 19-Feb-2008 Stephan Aßmus <superstippi@gmx.de>

I was just going to implement Begin/EndViewTransaction(), but I saw
it is already implemented they way I thought it could be done - nice! Just
some simplifications.


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


# ec20f9f60d8d7e8036d913f9e96463635ec37899 18-Feb-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

reverted r21961. A menu could be closed, if the user
clicked (with the menu opened) on a view which uses GetMouse() in a loop
(PE, tracker), since it stealed the mousedown message.



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


# 1ea104aeebf1c8161bb0f0b961d99b925b79afab 05-Feb-2008 Axel Dörfler <axeld@pinc-software.de>

UpdateIfNeeded() no longer keeps the looper's BMessageQueue locked when
calling DispatchMessage().


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


# 7cb933783558adeee749d0a42ca35d0fe630b82d 04-Feb-2008 Axel Dörfler <axeld@pinc-software.de>

* Ingo broke binary compatibility of Window.h in r18649, thanks to Stefano
for finding this. This should fix bug #1734.
* Removed unused BWindow members and the temporary PrintToStream() method.
* Indentation cleanup (DirectWindow.h had some spaces instead of tabs).


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


# 0625889c619cb5dd73fee1ee32c37ef96cd54775 10-Jan-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

IsModal() now includes also the kMenuWindowLook. Fixes bug #1269. Please
review.
Added a compile time option to switch off the use of the cached menu
windows. Looks like there is a problem with the focus system, if I keep
the cached menu window around, it "steals" keyboard events from the main
app window after the menu has been opened and closed once.


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


# 33d3580bdcda90ec9641cf4e05110be2c7307c90 30-Dec-2007 Axel Dörfler <axeld@pinc-software.de>

Fixed copy&paste bug, thanks Stefano!


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


# deb58f165b8ab405fa9e22a85118fcb023da4c3c 29-Dec-2007 Axel Dörfler <axeld@pinc-software.de>

* DispatchMessage()'s B_WINDOW_ACTIVATED now checks if there are any pending
activation messages, and always retrieves the information from the latest.
* Reverted r23062, as the above should fix bug #613 as well.
* This should also fix bug #1674.


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


# 099fb2d3be5caa3ea7413fe6289047479161c877 25-Dec-2007 Stephan Aßmus <superstippi@gmx.de>

* removed declarations for methods which are not used/implemented in View.h
* improved naming of some private BView functions and used our underscore
prefix
* added a _DrawAfterChildren method to BView which does the necessary setup
and calls the DrawAfterChildren hook
* call the new _DrawAfterChildren method in the BWindow implementation, this
was easy since the view tokens are already hierachically sorted
* implement support for B_DRAW_ON_CHILDREN in the app_server's ViewLayer, it
simply means that children are ignored for the views clipping region, any
drawing methods will paint over children (therefor the B_DRAW_ON_CHILDREN
flag is even properly named)

With these changes, support for B_DRAW_ON_CHILDREN and the DrawAfterChildren()
hook are implemented and behave exactly as on R5 as far as I can tell, also
for the view background painting.



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


# ebe41f1a762536773439faaa3ff9f4549c867476 04-Dec-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

added a TODO item


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


# d7c343d92cea4b76d1c7c779df12653e697de828 04-Dec-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Dispatch also the B_WINDOW_ACTIVATED messages. This fixes bug #613, but
we need to check which other messages are handled by beos here.


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


# 7acb68edf9be9a35a8203bb9a0b5a643d7ccad5b 25-Sep-2007 Axel Dörfler <axeld@pinc-software.de>

Made the private B_HIDE_APPLICATION message (now a misnomer) hide all applications
that share the same signature - so that this feature is now consistent to what the
Deskbar does.


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


# 229f4986d283d4c4855b9ead892a15182c8cedd8 25-Sep-2007 Axel Dörfler <axeld@pinc-software.de>

* Added private (as of now) B_HIDE_APPLICATION message that calls
do_minimize_team() (which is what the Deskbar does when you select
"Hide All").
* Added keyboard shortcuts to minimize, and zoom a window, and to hide
the whole application (Cmd+Ctrl+M/Z/H respectively). The former two
are also present in Dano and up.


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


# 22ca66b9f86a0e9278ad95099910a2d809b77f07 28-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

Fixed bug #1028 from both sides:
* FindPanel::SetUpAddRemoveButtons() called Window()->FindView() but did not
check if Window() was NULL.
* BWindow now always checks the result of a BAutolock - this is why Tracker
got away with this bug on BeOS; NULL windows cannot be locked...


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


# b78583734c20b5ca97d78789379ae6733a9264d0 20-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

The client-side implementation of B_NO_POINTER_HISTORY did only work for SetEventMask(),
but not for SetMouseEventMask(). We now track the value of that mask in a dedicated
member variable.


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


# e46b225479d104af04eb3b0153cc8b08503f9484 20-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

The server is too fast sending the messages; we now filter out old mouse events
client side in case B_NO_POINTER_HISTORY is set.
This fixes bug #1415.


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


# cc116483efd690810eef9795c48e8ff69e662e85 14-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

The bug worked around in r21960 also affected Haiku. Now, a menu is only quit if the click
into its "controlling" window targeted the preferred handler - ie. is a standard click that
is not sent because of an event mask.


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


# b73648647dbeca06a9894c275b114b7e8fbace7a 14-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

* Fixed the TODO added by Ingo in r21957: locking the application didn't even make any
sense. Instead, we now lock its app_server connection only. The deadlock as exposed
by starting Icon-O-Matic twice is now gone, at last.
* Fixed the TODO added by Ingo in r21953: moved the thread/handler renaming code in a
dedicated method _SetName() which is now called from _InitData() and SetTitle(); the
"w>" is no longer lost.
* Unlike the BeBook states, BMessageQueue::RemoveMessage() is indeed not supposed to
delete the message it removes.


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


# 78fe3db271dffd56e612118ddf17014b769be08e 14-Aug-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added another TODO.


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


# a1a144828cc0b0e92029fd391c751d40802d18ce 14-Aug-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added TODO.


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


# 7a90948b2023e576a843544f638f25cb183d9b37 01-Jul-2007 Stephan Aßmus <superstippi@gmx.de>

* this should fix BWindow::FindChild(BPoint)


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


# 1e651d5b4fad69b34d84bde88962f18a1f82ec5a 03-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

Modal windows no longer install the 'Q' shortcut anymore. This fixes bug #1256.


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


# 288e17885a07678d7c9eab93abb3401c6c14c5f8 03-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

Implemented B_CLOSE_ON_ESCAPE as mentioned on the mailing list.


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


# 8860ba90e6a5eb328c9458b3fdf07fc0b0ca8be5 24-Apr-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

If there's a opened menu, the window should "eat" the B_MOUSE_DOWN
message. This fixes bug #582 and now menus behave like on beos (or
should, at least)


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


# f5faf48a9ffbb3f0eac582473363ecf6944bfd72 17-Apr-2007 Axel Dörfler <axeld@pinc-software.de>

Small fix for _StealMouseMessage(): only if "feed focus" is "false", the message
can't be used.


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


# ffcc37a0aac307a6b91c9f41c36d3452d7dcc483 14-Apr-2007 Axel Dörfler <axeld@pinc-software.de>

* Added and implemented B_INVALIDATE as available on Dano; to invalidate only a certain
part of the view, you can add a BRect "be:area" to that message - very handy.
* Cleaned up AppDefs.h a bit.


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


# 9dbe170a694e59988263a752b746b6a82a5ff277 26-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Implemented direct message passing for local targets; this fixes a deadlock
with PostMessage() in case the message queue is full.
Some notes:
* for synchronous replies, we don't use this mechanism yet, but it could be
extended to do that as well.
* the code looks so complicated because we need a way to access the looper's
queue without locking it (to prevent deadlocks); like Dano's solution, I've
abused BTokenSpace to store a BDirectMessageTarget with a BHandler.
* we also need to decouple the lifetime of a looper's queue from its target,
as we cannot lock the looper, and therefore, can't guarantee it stays valid
as long as we're accessing it outside of BLooper.
* init_clipboard() now needs to be done after the global constructors have
been called - since sending messages now needs gDefaultTokens to be initialized.
Since this is done per image, it shouldn't cause any troubles, though.
* some minor cleanup, removed unused _msg_cache_cleanup_() and friends.


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


# c01f349e6d41177d7be185b217eac237bcee621f 25-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Cleanup:
* Got rid of unused BLooper members
* renamed fTaskID to fThread
* Removed private and deprecated AddLooper()/RemoveLooper()/... stuff; BLooper is now
directly calling BLooperList methods.
* Got rid of extensive and useless comments
* Made a few TODOs more clear
* Merged InitData() and InitData(...) to _InitData(...)
* BLooper::Team() now uses BPrivate::current_team(), sTeamID is gone now.


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


# e30afed4394414aa6ca3163de20901c0b3b367c6 19-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

As per Ingo's request, I moved calling BRoster::Private::UpdateActiveApp() into
the app_server (and updated all comments that said otherwise).


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


# c2f641f2e51127c2318b5c4201919ec14ae9fe56 18-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Turns out the whole "active app" mechanism in the registrar wasn't used at all; the
Switcher now works as expected.
* Renamed TRoster::ActivateApp() to UpdateActiveApp(), as the app is already activated
at that point (the registrar only keeps track of it).
* BWindow::DispatchMessage() now calls the new BRoster::Private::UpdateActiveApp()
method when it receives a B_WINDOW_ACTIVATED message.
* Added BRoster::_UpdateActiveApp() which calls the new B_REG_UPDATE_ACTIVE_APP.
* Removed now unused B_REG_ACTIVATE_APP.
* Minor cleanup.


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


# badbad99a926c8d5c30a9ca5bdc1157cfcec94a6 18-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Messed up logic last time - the cursor should now work as expected again in BTextView.


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


# 6c3692dc874fc10cb1404b93f56f7ecbb81eec0b 17-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Turns out our pulse mechanism was broken; we need to honour the rate set by
SetPulseRate() even if it is 0. BView::_Attach() and BView::SetFlags() now
just set the previous pulse rate again (which will start pulsing in case
there is no fPulseRunner yet).


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


# 2a720453e153637622866d3f382c01a16bf12155 17-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

One step closer to the Switcher - still doesn't work, though, but at least the
BWindow code looks okay now.


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


# ccf137b886131b78172201ee7e04f4d011634a7f 06-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

BWindow::IsFront() was implemented incorrectly - we actually need to query the
app_server for this; added a new AS_IS_FRONT_WINDOW command for this.
For example, clicking on the menu bar to bring windows to front in FFM mode
does work now.


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


# fbeb1fca5fdb84f01f5c253abed47920a75853fb 01-Nov-2006 Jérôme Duval <korli@users.berlios.de>

Notifies input_server about the focus view IM awareness when the window is (de)activated
This fixes the last part of bug #658


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


# cc347633b95b052ad3b27d174904f61429ccdf8e 26-Sep-2006 Axel Dörfler <axeld@pinc-software.de>

This fixes bug #851 - GLTeapot unlocks the window before indirectly calling
BWindow::UpdateIfNeeded(); BPopUpMenu::Go() should be independent of this.


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


# 946d88f90b9c740ffbfd3ceb123e376a7d0cfa95 12-Sep-2006 Axel Dörfler <axeld@pinc-software.de>

We're now using the same priorities for windows as BeOS does - this should improve
the responsiveness of the GUI, and should also fix bug #742.


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


# 9ecf9d1c1d4888d341a6eac72112c72d1ae3a4cb 26-Aug-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge from layout management branch.


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


# 967302c5b72558235cbd795842fd480643d4f16b 23-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed a stupid copy&paste bug.


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


# fa407130aaf427956a50adf6b31781d26e8fb52d 24-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

Now this should nail down bug #762 pretty well: BView::GetMouse() no calls the
private BWindow::_StealMouseMessage() which makes sure only messages for the
preferred handler are stolen, and also, that nothing gets lost that shouldn't
get lost.
Also updates the fLastMouseMoved view in case the message is actually removed
due to GetMouse().


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


# f60d8e0b59a6181cac608787b4aab21110cb6f0a 23-Aug-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Replaced Unlock() with UnlockFully() in BWindow's destructor, fixes bug
406


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


# 9319c7b88fe1beb6b2065aa70b74a0f6cb604530 07-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

We don't add the Alt-w shortcut to modal windows anymore
by default, thanks to Darkwyrm for pointing to this.


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


# 4fec945a033d3e7ef3717f22d71f6e3053f007fc 02-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

Stefano's investigations did the trick: added MenusBeginning()/MenusEnded() in
the shortcut evaluation.
This fixes bug #531.


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


# 7212229343784d9b2e4bad3c1e55ddde89eb9852 15-Jul-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

The BWindow destructor is called with the window locked, but we need to unlock to acquire the menu semaphore. Updated BBitmap to lock he window on quit too. This fixes last problem mentioned in bug 406

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


# 11235ae729e3f91f1141068276715a82e0b0928a 10-Jul-2006 Jérôme Duval <korli@users.berlios.de>

"class" is added by BArchivable::Archive(), no need to duplicate


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


# 8ebbfab33351b883b5f18d3ca70eadf5d617d510 20-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

When the B_COMMAND key is pressed, the event will not be forwarded to the target
handler anymore, no matter if a shortcut existed or not.
This fixes bug #498.


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


# 7477c792d5cb26a3797f8c3079ab5afe45707546 14-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* Dropped messages come in a _MESSAGE_DROPPED_ "packet", and were unpacked much too
late, in DispatchMessage(), working around all eventually installed message filters.
This fixes the odd "cannot drop files into file panel" bug mentioned in bug #669.
* They are now handled in _DetermineTarget() and _SanitizeMessage().
* _SanitizeMessage() is now called earlier, so that no user code can see them before;
even though this might give you wrong MouseDown() coordinates in combination with
a redirecting message filter, I think that's exactly what would happen in this
situation under R5 as well.


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


# da08acb8bf6c19929320a161e0f91996eec0b950 12-Jun-2006 Jérôme Duval <korli@users.berlios.de>

fix some more bugs in scripting handling, this seems to never end
Having canna input method installed shouldn't crash Haiku anymore


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


# 5b741ecbfd85b993f16de16159992c6a0eccd777 12-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed warning.


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


# e91315aa2da185db26644ce0adad61bdde18108e 11-Jun-2006 Jérôme Duval <korli@users.berlios.de>

scripting in BApplication is mostly fixed
BLooper had a be-handler named suite
BWindow is now exposing Active
scripting to BViews isn't working yet


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


# f4fc3d626a425bf59886cd5773fd2f64ff285b10 05-Jun-2006 Jérôme Duval <korli@users.berlios.de>

* fixed some more GetSupportedSuites implementations
* fixed some local variables names
* fixed the case of some message attribute names


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


# a03ac895264010903a2bf3ba28f259d1d1dbfefd 05-Jun-2006 Jérôme Duval <korli@users.berlios.de>

fixed some property_info and value_info for BShelf, BMenu, BWindow and BView
real support is to be implemented for a lot of them


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


# 79adc02bc6eeb389ef0c96681b81c77c23f91867 04-Jun-2006 Jérôme Duval <korli@users.berlios.de>

begin to fix bug #658:
makes use of BWindow::_SetFocus() in BView::MakeFocus()
BWindow::_KeyboardNavigation() now uses BView::MakeFocus()
This is though not enough: _SetFocus isn't called on window activation/deactivation, thus the input server isn't aware of a focus view change in this case.


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


# 95f766fa3e2b5ef1cbc4dd834e18f511e5d8e659 31-May-2006 Stephan Aßmus <superstippi@gmx.de>

cleanup of archiving code

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


# 848b89034e2c6bc7b4a990f832e2102f2c6044ba 27-May-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

More hacks to BWindow's mousedown handler, to fix some problems with menus. Fixes bug 610 among other things. Note: I don't like this code so much, but apparently BeOS handles it in a similar way. I accept suggestions on how to improve this.

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


# e061d1bae5349fbb420946e44b9c6594786e3f6d 27-May-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

an eventually opened menu is now quit in BWindow::DispatchMessage()
before sending a B_MOUSE_DOWN message to any other view. This fixes bug
594 for real and another bug in BMenuBar. BMenuBar tracking will also
be simplified a bit because of this. Install items to a NULL window on
Show() as does R5 (although I don't know why yet).


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


# a502e8cd6e9c7cf22d12540a3f362f553e8247ab 27-May-2006 Stephan Aßmus <superstippi@gmx.de>

sorry, forgot about this change... fixes build

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


# b30e90211eddde5fc96258dfaf8364f2fefd9695 24-May-2006 Stephan Aßmus <superstippi@gmx.de>

added a way for BWindow to store and restore arbitrary decor settings,
currently those include only the tab location


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


# 3279f3b0556dae138f680000d77bf0ed51e6993f 03-May-2006 Michael Lotz <mmlr@mlotz.ch>

Detect recursions of UpdateIfNeeded. This is necessary as we may call hook functions (FrameResized(), FrameMoved()) that in turn could call UpdateIfNeeded again. This is the case for DarkSite which uses GetMouse() inside FrameResized(). This fixes resizing DarkSite and probably fixes bug 539 too.

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


# 9991d2b1acc8d704b5f32288436d1c7ee9b5572a 01-May-2006 Axel Dörfler <axeld@pinc-software.de>

* Applied patch by G. Zachrisson to fix the endless loop in _FindNextNavigable().
* Rewrote broken _FindPreviousNavigable() - it now does the exact opposite of
_FindNextNavigable().
* Both methods did not ignore hidden views - they now do.


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


# 29a92e4f53cbce3cf475419d35fa54cc1d048c31 24-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Now checks all calls to Lock() - this should fix buggy apps like Globe in bug #499.


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


# cbdbfd3a80dd4a14dc25a531448da88b0965c6d6 18-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Implemented Switcher support in BWindow - doesn't yet work correctly for some
reason, though.


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


# 8165fa3936801e2de84bbc9b7a13b2e6e27c8abd 17-Apr-2006 Stephan Aßmus <superstippi@gmx.de>

* fix bug 414 by Sync()ing in UpdateIfNeeded() to make
sure all messages that could trigger an update have
actually arrived at the server
* small clean ups here and there, some clarifications in
comments
* check for the return value of Lock() in DisableUpdates()
and EnableUpdates()


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


# a5c56979374f2decc1e74d0c8e61b0332b43e906 17-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed starting keyboard navigation (when no view has focus yet in which
case the window receives the keyboard message).
This fixes bug #411.


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


# 39cdae74a7fc098db3a59a3e9db03b6ad57ab991 10-Apr-2006 Michael Lotz <mmlr@mlotz.ch>

First steps at getting drag & drop to work properly. Simple drag & drop (draging Tracker items) should work now. Not sure about the negotiated version (with mimetype exchange). Fixed left behind drag bitmaps. Some cleanup.

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


# 835a7ebdf0781b55761fa159d20ab95d0bef4ece 07-Apr-2006 Stephan Aßmus <superstippi@gmx.de>

no need to contact the server for this, transaction means that drawing commands are not immediately flushed, which is handled entirely on client side

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


# cb8bdc4edae377c5900904a38f62c0ec08d5c5a5 05-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Window's destructor should acquire the menu sem, not delete it. Could help fixing bug 422

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


# 7bb48db1f2d5918e4ffabf8c08445af7f2e6ebea 04-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* The BView::FrameResized()/FrameMoved() hooks are now called asynchronously
as in R5, and no longer directly. This fixes bug #301.
* As a side effect, the hooks are now only called when the view is attached
to a window, as on R5.
* Removed dead B_VIEW_RESIZED/MOVED code from BWindow.


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


# 557e9c04eb451e159e4188e2c56713834bcce45a 12-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Setting fRunCalled in case of failure is stupid, as this prevents the
window from being freed on Quit(). There still is a memory leak within
StressTest, though - but it's pretty tiny now.


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


# bc63570c9b4445304dfd38ce6927946a351720c6 12-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

BWindow::Show() will no longer Run() its looper without a valid app_server
connection.
StressTest now detects this case and quits those windows.


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


# 3dd881e3af4acb0043c47b43123f938f9b472ec9 12-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed memory leak in StressTest and BWindow: they both did not delete the
message they passed to a BMessageRunner object.
* Added note about the ownership of the message to the BMessageRunner
documentation.


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


# ce0be66ff4a379229bdad0d02d14ff3dcd585a34 12-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

When the creation of the window failed, all further messages accidently went
to the ServerApp, instead of being dropped - the window link is now updated
correctly in that case.


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


# f025cd8b723b90c95f1ba7bb7053bc1b60dac882 12-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

While the user resizes a window, programmatical resize operations are ignored,
likewise, while the user moves a window around, programmatical moves are ignored
as well.
This fixes bug #264.


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


# ecf9f948002cda853199de279dde5255737e4124 11-Mar-2006 Stephan Aßmus <superstippi@gmx.de>

* cleaned up fPulseRunner stuff, I have no idea why fPulseEnabled was
useful... so I removed it
* fixed memory leak with SetPulseRate(0), fPulseRunner is now
properly freed in the Window destructor
* fTitle is now freed as well
* fix some potential leaks in BView destructor as well

I wrote a stress test app, which I'm soon going to commit as well...
it shows that not all memory leaks are fixed by this patch, I could
use some help with this...



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


# da192ba4dd10c8dffaff70f0105093a14e719f4a 10-Mar-2006 Jérôme Duval <korli@users.berlios.de>

implemented input_server notification of IM aware focus changes, not tested


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


# 9b5a183539f2b7eb48da0e25a9470ebd4e7cc08c 27-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed BWindow::Show()/Hide(): fShowLevel was changed and checked without
holding the window lock.
* Run() is now called before creating the window in the app_server when
Show() is called for the first time (which is now checked with fRunCalled
instead of some thread arithmetics).
* Minimize() now sends the show level of a window to the app_server, so that
it can actually determine if minimizing or maximizing the window should
have any effect. This fixes bug #225.
* fShowLevel's meaning is now reversed; when it's above zero, it now means
the window is shown (before, a level less than 1 meant shown). This definitely
better fits its name :)


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


# 05b9fbf51f11117173ced2fe4887be8a9c977eb3 17-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

Accidently broke the build with the previous revision...


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


# dd7b93c87587c10ae1090a322a0cc752cbb62245 17-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

Window has to be locked when it's going down or its children are queried/changed.
This fixed bug #182.


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


# 35e74831d430fe6520a915c567dc8b4e045d49af 15-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

* Shortcut messages now add a boolean "shutdown" field to the message - this
prevents Tracker from being quit by Command+Q.
* Also, it's now possible (as on R5) to remove the Command+Q shortcut.


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


# 995ab7b3c6a636cd658df3d7d13a616d91ffb2d6 09-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

The server now differentiates between hidden and minimized - that concept somehow
got lost, before.
It might not work 100% correctly yet, but it works good enough to hide the Tracker
status window from the Deskbar, and thus, fixing bug #133.


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


# c81d2e7a59238a41ebbd349c29ff320b35f2f391 09-Feb-2006 Stephan Aßmus <superstippi@gmx.de>

* fixed window zooming/unzooming behaviour
* fixed FrameResized() and FrameMoved() not
being called anymore in response to ResizeTo()
and MoveTo() since I introduced a check in
DispatchMessage() (fixes bug #123)


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


# 95e29889f4ada13620594a84eb23df831c128345 06-Feb-2006 Stephan Aßmus <superstippi@gmx.de>

This fixes the update problems that I could observe. The client might have been not in sync with the server regarding window position and size, which in turn messed up the ConvertFromScreen() functions and also the view Bounds(). Therefor the current window geometry is also added to the information the client gets when starting an update session. I think the problem was there before my previous changes, just maybe less likely to be observed.


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


# bb160ab5f62ff517d4d83947669b39efc151c594 06-Feb-2006 Stephan Aßmus <superstippi@gmx.de>

change the way the _UPDATE_ message is used: it is now a mere notification that some views need updating. The BWindow will then pull data from the server which views exactly and the update rect. Therefor, the server can append regions to the current update session even if an _UPDATE_ message has already been sent to the client. If multiple views are invalidated in the client, only one update session will be triggered instead of two with the old implementation. Some drawing defects can be observed, but I know how to reproduce them so I hope to fix them soon.

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


# e9e5c69a25871e2b8f8cc542654f1605469ec372 20-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

* Use _FindView() where possible instead of using BTokenSpace::GetToken() directly.
* Fixed some issues in _UnpackMessage():
- The focus view could have been removed before its turn which was ignored
(and could led to a crash, for example when moving the Deskbar around).
It's now tested if it's still valid (can't use _FindView() here, as the
the preferred handler of a window could be any BHandler).
- fLastMouseMovedView could have been NULL in which case there is no
need to let the message be processed (was harmless, though).


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


# 238ba7d32153037f6bcb218f50d07b4c14f4aae2 11-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

The last change accidently put messages to invalid targets back into the game.
_DetermineTarget() is no longer called for these messages, "handler" will stay
NULL and the message will be dropped.


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


# 54354618d524f684e979966b7e5f72db13985bad 11-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

BWindow::_DetermineTarget() now defaults to the window, instead of no target at
all in case the window doesn't have a current focus view.
That allows shortcuts like Command+q/w to work again.


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


# 7afc7c5074c2a3382be788d22fe999040c582ccb 08-Jan-2006 Stephan Aßmus <superstippi@gmx.de>

ServerFont:
* fixed weird pointer conversion in SetStyle()
* fixed a potential mix up in operator=() in case the
other ServerFont has fStyle == NULL

ServerWindow:
* the WindowLayer fTopLayer cannot be deleted by
client request, just for safety reasons
* the link is flushed if there is no drawing engine,
but this case is theoretical only
* deleting the ServerWindow object syncs with the
client, so that when BBitmaps are deleted, they
can be sure there are no pending messages (which
would be executed in a nother thread)
* there is no timeout anymore when sending messages
to the client, which made absolutely no sense

AGGTextRenderer:
* renamed fFontManager to fFontCache, because that's
what it really is
* fLastFamilyAndStyle defaulted to the system plain
font and therefor that font was never loaded when
the font never changed meanwhile

DrawingMode:
* I'm not quite sure but I think there was the
potential of a division by zero, at least I
had crashes with "divide error"

HWInterface:
* fix update when the cursor shape changed in
double buffered mode

ViewLayer:
* since the top layer is never really deleted
before its time has come, it is not necessary
to set it to NULL in the ViewLayer destructor

ViewLayer/WindowLayer:
* added a function to collect the view tokens
that are affected by an update session

EventDispatcher:
* use the importance of the message for the timeout
in _SendMessage()
* drop mouse moved events in the server if we're
lagging behind more than 5 ms (Axel, maybe review)

View:
* there were some problems with the locking
of the BWindow looper in RemoveSelf(), since
this is called from the window destructor,
also of BWindows from BBitmaps, which have
never been run (this might need review), at
least I seem to have solved the crashing
problems introduced by actually deleting the
view hirarchy in the BWindow destructor
* fixed _Draw() for being used non-recursively,
temporarily disabled DrawAfterChildren, which
didn't work yet anyways (because views cannot
draw over children in the server yet)

Window:
* small cleanup when deleting shortcuts
* sync with the server when having send
AS_DELETE_WINDOW (see ServerWindow above)
* fixed locking in Begin/EndViewTransaction()
* removed folding of _UPDATE_ messages, since
there is only one ever in the queue
* set the fInTransaction flag during an update,
I plan to use this in BView later to
flush the link when drawing outside of an
update
* BView::_Draw() is now called by view token,
this gives the next leap forward in speed,
the overhead because of drawing clean views
was considerable



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


# ea34f0f03b64aa4fd8927a48a39c8ee037e1c9af 08-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

If there was a BMenuItem view with shortcut, it tried to delete the shortcut twice
(as the shortcut list wasn't emptied), courtesy of Stippi.


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


# fb82d189d02a686787c6f646143e334b99f6cdaf 06-Jan-2006 Stephan Aßmus <superstippi@gmx.de>

* BWindow deletes its view hirachry
* BViews set fOwner to NULL recursively when detached
* updated a comment


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


# 9f8f6275f6cb1c4e6d161a711c93e23694429410 29-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed shutting down apps with file panels - no more hang:
* if file panels shouldn't be quit, we no longer call QuitRequested() for
them and stop quitting windows (which left normal windows open, because
file panels always return "false" in QuitRequested())


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


# 36e605d5f34e9fc0d398b62598b8a350a416b531 20-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

combine _UPDATE_ and B_WINDOW_RESIZED messages, I left the old code commented, because my combining code might need review. I don't understand why the current message is still in the queue and why passing 1 as index to FindMessage does not seem to work, BMessageQueue::RemoveMessage does not delete the message as documented in the BeBook... everywhere else in the code it seems to be taken as a fact

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


# af43bb3c9410b42ed310a2db1489656be5f0b969 07-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

a first and really naive implementation of drag&drop support, no visuals yet... Axel, no worries I'm going to clean this up and remove stuff from EventDispatcher again...

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


# 715476b7efd237a7d0ac3e92f7c2fdaabca3dd2f 06-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

The resize code now works correctly, finally - it temporarily did harm ;)
The BViews must be resized directly after every change in the window size - we
cannot wait until B_WINDOW_RESIZED, since subsequent calls have wrong view
sizes, then.
B_WINDOW_RESIZED is only really useful for app_server caused window resizing.
Added TODO to SetLook(): it may change the window size as well.


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


# 0a95bea66d370459d9a0d7712f2dcbcdaa8eb00c 06-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

fixed wrong usage of ConstrainClippingRegion() introduced by myself a couple months ago

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


# ac4fe990c92665d8b37c0d6ff691e7c2dea004c4 05-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

* The client views are now automatically resized on B_WINDOW_RESIZED as they are in the
server.
This saves overhead on both sides, the server doesn't need to build the update message
for the client, and the client doesn't have to unflatten and parse another message.
* This code is actually needed for the new clipping code in the app_server, but shouldn't
do much harm for the old app_server, either.
* Also disabled getting the bounds from the server, as that is just never needed (and would
also break the code).


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


# c072e9f1f57e66aa0d758cdc49db0bc76b1e65e4 02-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

* BWindow::AddToSubset()/RemoveFromSubset() no longer send their team ID; this
is known by the server, anyway.
* B_MODAL_SUBSET_WINDOW_FEEL now also works as expected.
* Renamed AS_REM_FROM_SUBSET to AS_REMOVE_FROM_SUBSET.


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


# 05aea1dd4af7fe68b94959b5d313cfcbba413eef 01-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

Better app_server communication for SetFeel(), SetLook(), and SetFlags().
SetFeel() gets a status value back as well.


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


# 349837d9c927683ae64c141d0f6a2b7661fc131f 28-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Some cleanup in the communication code.


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


# 7c6865642c9d63f98875742a47e9f28b281f3653 25-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* Don't trust a message that we got goes to a handler that belongs to us.
* when we terminate gracefully and in the looper's thread, we no longer
unlock ourselves.


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


# 84081467b9354634db1f8887233356552b70a53e 25-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Don't trust the app_server that the view token under the mouse belongs to the
current looper.
This needs an investigation in the app_server, as that probably shouldn't happen?
(well, I wrote that part, I should know better)


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


# 147bfa2a75e1eb0df3780de404059846c3fb63da 24-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed the port where app_server messages are received from "w_rcv_port" to "w<app_server"
to match the name of the application's port for that task.


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


# 860c144735d33d2cc10efe4e0337dbf4b36ed9da 24-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

No longer checks if there is already a "be:transit" item in the message;
there should never be one (at least not a valid one).


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


# 5604d3c9ce05669fb26f5f3a4a858c5269b14994 24-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* _DetermineTarget() will now return fLastMouseMovedView in case there
was no valid "_view_token" in the mouse event.
* _SanitizeMessage() will now only add the "be:transit" field for
B_MOUSE_MOVED messages. It will also now only update fLastMouseMovedView
for B_MOUSE_MOVED messages, and not for all mouse messages.


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


# 43ca7765639a4413378cf3fd4454602f4bd204e9 23-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* applied the logic from BWindow::task_looper() to BLooper as well (messages to
invalid target handlers are dropped).
* B_PREFERRED messages now go to the looper if there is no other preferred handler.


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


# 6450b76dd4cef8cf04e8d31471517b40a35fa09a 23-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Next big step in the event handling:
* RootLayer's mouse event processing is now at its minimum - the
EventDispatcher handles them now. As a result, a window will now
get only one message per event.
* RootLayer adds "_view_token" to mouse moved messages that specify
the view currently under the cursor.
* There is now a mouse event layer in RootLayer that gets preferred
when it's set - this is now used for the window moving instead of
the previous mechanism.
* changed the previous DistributeMessage() to an UnpackMessage()
method following Adi's suggestion.
* caveat: some things might be functionally broken in RootLayer now
because of removing the mouse notification stuff.
* "be:transit" handling is now done completely client side by
BWindow::_SanitizeMessage(() (similar to what the input_server does).
This should also make the mechanism pretty robust, since every
B_MOUSE_MOVED message can now trigger the view transit (in case a
message is lost). B_WINDOW_ACTIVATED messages should be generated
client side as well.
* renamed AS_LAYER_GET_MOUSE_COORDS to AS_GET_MOUSE as it's not a
layer specific command, and also gets the mouse buttons.
* B_MOUSE_* messages from the up server now contain only a "screen_where"
field; "where" (in window's coordinates) and "be:view_where" are
added in BMessage::_SanitizeMessage().
* messages that don't have a valid target in the looper are now
dropped instead of being sent to the looper - this should be done
in BLooper as well, though.


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


# b0952015032d9df40d5f92a5cef46398abb401d9 21-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* changed the way a message is forwarded to the focus view (instead of adding
a suspend focus field to the message, there is now a "feed focus" field in
case the message should be forwarded).
* added a comment to the BPoint version of _FindView() (since it's broken)
* _DistributeMessage() is now called after _DetermineTarget() - so that it
can prevent sending the message twice to the focus view.
* removed BWindow::DoUpdate() as it's no longer used.


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


# c919ec686218389d58e4dd6d952a75071f7a81a6 21-Nov-2005 Michael Lotz <mmlr@mlotz.ch>

Fixed build for non-Message4 again. Both BMessage::Private classes should be compatible.

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


# 14d02d22f66d08946519ad2b073be23fa78fc0c3 21-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Huge cleanup and fixes:
* attachView() is now called _CreateSelf() and creates the app_server
view counterpart for itself, and no longer for a child view.
* removed superfluous deleteView().
* moved drawing from BWindow::DoUpdate() to BView::_Draw().
* made the recursive hook call functions consistent.
* fixed BWindow::DispatchMessage() to send public messages to the intended
target (instead of always handling them itself directly).
* DispatchMessage() no longer eats unmapped key events that were targeted
at the window directly.
* B_KEY_DOWN and B_KEY_UP events are now send to the target view as well
(this couldn't work before as BMessages were broken with B_PREFERRED_TOKEN).
* the default button is now correctly targeted by BWindow::_DetermineTarget()
(previously, the enter key was hacked to get through via _HandleKeyDown()).
* removing a view now also makes sure it won't have focus any longer.
* also, the DetachedFromWindow() hooks are now called first, so that any
changes made there cannot mess up our window anymore.
* removed BView::SetPattern(); _UpdatePattern() now does its job.
* renamend private methods to match our preferred style.
* removed unused methods and variables.
* more consistent naming overall.
* removed _PR3_COMPATIBLE_ stuff - there is definitely no need for us to be
compatible to that one.


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


# 4ceb1e519c0447147b1d8b54a324bb7fedd3a606 20-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* reverted Adi's premature changes to BWindow and restored _DetermineTarget() and
task_looper() again.
* removed BMessenger::fPreferred - whenever you had to specify "usePreferred" separately,
you don't have to do that anymore - use B_PREFERRED_TOKEN instead.
* fixed BTokenSpace::GetToken() semantics: it will no longer touch the "object" argument
in case of failure.
* Introduced a BWindow::_DistributeMessage() that will be part of the event dispatcher
counterpart to the app_server (the other will be _DetermineTarget()).
* Made it easier to use Michael's Message4 implementation: just add the following line
to your UserBuildConfig:
AppendToConfigVar DEFINES : HAIKU_TOP src : USING_MESSAGE4 : global ;
* Introduced ServerWindow::HandlerMessenger() and FocusMessenger() - the first will
target the client handler, while the other will target the preferred handler of the
client looper (usually the view having focus).
* Fixed dano message unflattening in the Message4 code.
* Changed BMessage::PrintToStream() to no longer use macros in the Message4 implementation.
* I hope that's all - it's a huge change, but it's all connected.


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


# ace01f864b2b7923d770d6af1331cfc3adc05eee 19-Nov-2005 Adi Oanca <adioanca@nowhere.fake>

Removed BWindow::_DetermineTarget(). BWindow's task_looper() just calls BLooper's one. Took Message4 stuff from BWindow's task_looper() and put it in BLooper::task_looper() - guess this is wanted...

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


# 0139f287b400e0a4d6601f8250910ac28c2ee6f7 19-Nov-2005 Adi Oanca <adioanca@nowhere.fake>

Following recent changes (Axel's token stuff or Message4 impl) I could not launch a single application/window in app_server. This fixes the problem. Note I always test with DEBUG=1. Am I the only one who had this problem?

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


# 8bd2c11fc48ac2284087bfe4119fc041fd0ffb3b 13-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Moved the declaration of roundf() to HaikuBuildCompatibility.h - it's missing from
math.h but exported by libroot.so.


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


# 5fa643150bc9cebf8d28a41b38eff2b1fb22e3a8 13-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* no longer needs to define roundf() as it's now part of libroot.so (like on BeOS).
* for the libbe_test target, though, I need to declare it, although it's also declared
in BeOS' math.h - Ingo??
* removed comment about B_ASYNCHRONOUS_CONTROLS - it's only used by our control classes
to behave differently depending on that flag (mouse tracking).


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


# cf10934e5fde37c267f7fb3bec89a8e9f5d9c476 13-Nov-2005 Michael Lotz <mmlr@mlotz.ch>

Introducing Message4. The changes to the related sources are ifdefed with USING_MESSAGE4 which is defined in Message4.h. To use Message4 the Message4.cpp, Message4.h, MessageUtils4.cpp, MessageUtils4.h and MessagePrivate4.h have to be linked to their counterparts without 4 suffix. Then MessageBody.cpp and MessageField.cpp have to be commented out in the app kit Jamfile and r5_message.cpp has to be added. There remain some bugs to be found. Feel free to change that.

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


# d51a034e21deb03cdf2e3bce91f729a47fc15a1f 12-Nov-2005 Stephan Aßmus <superstippi@gmx.de>

prevent windows from being located at fractional offsets, fixes BAlerts (again)

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


# 292d5ced0eb76e06613201fc563de16ef812ef18 12-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* Rewrote shortkey handling - it now actually works as expected.
* Some work on _DetermineTarget(), more to come.
* Minor cleanup.


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


# bfe7d52d7b6d3f85383be8380cdf049159832d42 12-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Shortcuts now at least somehow work, but the mechanism is still broken.


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


# 9032e7128e19bce776431b87bba419614531d7ca 11-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

InitData() no longer calls SetTitle(), but sets the title directly.
SetTitle() now also works when called before the window is shown for the first time
(ie. before the window thread is running).


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


# 8111539117870b92d2344d405f0a5343d5f6fb0f 10-Nov-2005 Stephan Aßmus <superstippi@gmx.de>

a quick solution to get some B_EXITED_VIEW transit when the mouse leaves a view, probably gets replaced when Axel is looking into the event handling stuff

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


# 9783d238c219b1956f3a582608f0a985e6c9b6b2 30-Oct-2005 Adi Oanca <adioanca@nowhere.fake>

just a change of constants.

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


# 5412b02d50423176c7b9818557a0f5da2562a2a0 29-Oct-2005 Adi Oanca <adioanca@nowhere.fake>

cleanup

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


# 88820e7210bad65fbfdf45dd8c98c7240f62e001 28-Oct-2005 Adi Oanca <adioanca@nowhere.fake>

the new clipping code uses the same mechanism for updating frame/bounds, so we don't need some things anymore.

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


# a5cd1aeed00f2d832b0390f3e54abc6e7d2248fc 20-Oct-2005 Adi Oanca <adioanca@nowhere.fake>

small checkin to make the new clipping code work if one desires

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


# f2f3ee8fe7bf878c80c4d78c5eb6f394e55ef08e 17-Oct-2005 Adi Oanca <adioanca@nowhere.fake>

Undid my last checkin

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


# 908915fb91f8f2dde849194b27c354f2e9fce9c2 15-Oct-2005 Adi Oanca <adioanca@nowhere.fake>

This change should've been checked in for well over a week, back when I activated the NEW_INPUT_HANDLING define. Sorry about that!

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


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

Fixed keyboard navigation; it should now behave pretty much like R5 AFAICT:
- moved standard keyboard navigation into the BView::KeyDown() hook
- the window now only handles tab+option/command key
- B_COMMAND_KEY triggers group jumping, not B_CONTROL_KEY (that activates the switcher,
but directly in the app_server)
- fixed broken group navigation: (modifiers & B_COMMAND_KEY & B_SHIFT_KEY) is different
to (modifiers & (B_COMMAND_KEY | B_SHIFT_KEY)) and is just never true with these
constants.
That allows the tab key completion to be used again in Terminal.


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


# 18b5424c5f12197d3979cf38dc69149c5e98150c 24-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Implemented BRoster::ActivateApp().
* Added the respective case statement in AppServer::DispatchMessage().
The code that actually activates the app is still missing.
* Removed the remnants of the old way of notifying the registrar about
what app got activated (the activated client window did that).



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


# 4821aac3758df5860cb43f054594a9d71a527af3 18-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

The window is not supposed to resize the top level view. This removes the
"look-through" area in Terminal, and probably ShowImage as well.


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


# 39d30137dcd7c969ab1ab6e92549897dd7f7f9e4 18-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

A call to SetSizeLimits() can change the window frame, so it's now updated, too (a separate FrameResized() message is sent anyway).


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


# 3f319b3346fcc3f45786d9fb9c6ca698c4de7a22 10-Jul-2005 Michael Lotz <mmlr@mlotz.ch>

Some cleanup, some removed typos, some unification, some fixes and some added todos. Most of it related to client-server communication. Apps that rely on BFont stuff should work now (StyledEdit, Fonts, Keymap, Menu, ...). Or should not hang/quit at startup at least.

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


# 32d7b6cf210ab9340fb10763a7ab5df065cd33fe 09-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

BWindow::SetDefaultButton() crashed when setting another default button.

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


# 7dc436d8ddced8bde596634efe25ae5ceb11b704 07-Jul-2005 Stephan Aßmus <superstippi@gmx.de>

usability improvements to scrollbar, sorry had no time to include all of Stefanos drawing code yet, other visual improvements

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


# d520c103e5ad6338d40c99e73f511eb53d11a130 06-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

We must not delete the server window's port...


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


# b93d2480cc97e6d3c3ff2e69062e6cddc45dd1fc 05-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Now drops into the debugger if the window/looper is still locked in task_looper().


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


# 2b1246d968e93ad26e5d054142037c65f73d663d 05-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed AS_WINDOW_TITLE to AS_SET_WINDOW_TITLE.
Fixed handling in ServerWindow as stippi's latest commit broke it.
It's now properly done with a separate ServerWindow::SetTitle() method,
that will also take care to rename the window's thread.
Changed naming the window thread in the app_server to "w:<team>:<title>".


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


# 2e6a5805ba8db3b072d81257cc44f966def5fd37 05-Jul-2005 Stephan Aßmus <superstippi@gmx.de>

MenuField layouts the menu bar better with respect to fDivider, it aligns better with other controls. fDivider in TextControl is an integer number now, small fix and small cleanup in Menu, Window::InitData takes an optional BBitmap token to construct an offscreen window, fixed PrivateScreen IndexForColor, View prevents being located at fractional coordinates as in R5, BBitmap unlocks its offscreen window since it is never Show()n and needs manual unlocking, fixed Slider offscreen window mode and improved triange thumb drawing, ScrollView would not crash when passing a NULL target just for kicks, the private MenuBar class now implements Draw to draw itself a little differently inside the BMenuField (dark right and bottom side) - though how it currently sets the clipping region prevents the text controls to draw in Playground, needs fixing

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


# 173c6e9597bd28df573d2e7d48024e6df1ef72d3 02-Jul-2005 Adi Oanca <adioanca@nowhere.fake>

Fixed resizing/moving using the new clipping code. Stephan (I know I wrote about these changes in Layer.cpp) I saw the changes you did at how B_VIEW_RESIZE/MOVED are handled. This might break compatibility with R5. I think you guys should discuss this.

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


# 41c719936be8ae1e204f25e49c35684f2cf714b1 01-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed SetLook() (is not implemented server-side, though).
Finally got the thread rename code right under R5 8-)


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


# bb1336b44fd1e4de56ac33d3c8b66787083243d0 28-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Some refactoring and cleanup:
- renamed some members and methods to fit our style guide
- moved removeSelf() to RemoveSelf() (as those two are essentially
the same), and fixed it on the way: the state of the child views
is now also updated by the new _UpdateStateForRemove() method
- Moved BWindow::sendPulse() and activateView() to BView::_Pulse()
and BView::_Activate()
- some minor stuff

This also fixes the broken previous commit - I forgot to update
View.h; this update contains the previous changes as well. Sorry
for the inconvenience.


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


# 80a230b10efd1cd0d65c3007ced2694850e580dc 28-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Rewrote the push/pop state and ViewAttr stuff:
- it now seems to work finally correctly
- renamed ViewAttr to ViewState and put it into the BPrivate namespace
- some refactoring (moved some private BView methods to ViewState)
- renamed AS_LAYER_MOVETO/RESIZETO to *_TO (note the underscore)
- exchanged BView::originX/Y with fParentOffset (BPoint)
- divided AS_LAYER_GET_COLORS into separate ones for high/low/view color
- BView::SetPattern() now actually works as expected (ie. updates
only if necessary)
- exchanged the ViewAttr::flags with ViewState::valid_flags which inverses
the previous logic (which wasn't even used consistently)
- fState was initialized twice (incorrectly by the ViewAttr constructor,
and then again correctly by initCachedState()) - now the ViewState
constructor does the job alone, but correctly
- BView::PushState() no longer resets the state (it did so only locally
anyway...)
- cleanup


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


# c8e7f53e08c32deb27f14d18a2dbf8b58f309b64 27-Jun-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Radically culled the list of BApplication friends and introduced a
BApplication::Private class for accessing relevant parts.
* Pulled the app server connection and IK initialization out of
InitData() into a new method _InitGUIContext() and introduced a private
constructor that allows to avoid this initialization. This will be used
for servers that don't have GUI respectively want to init the app server
connection later.


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


# 85bd83a71069c8719f31d5ddfb0477a6bc1f4ebc 27-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

AS_CREATE_WINDOW now also gets the actual frame width and size limits of
the window on server side - ie. if the app_server could not create a
window of the size requested, BWindow::fFrame will still be correct
(and the size limits will mirror actual decorator limits).
Renamed fMinWindHeight and friends to fMinHeight and so on.


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


# 5727f0cfa2e8a008bcd2a72cd6f5e7c77b2440ba 27-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

B_WINDOW_RESIZED sends int32 values, not floats.
Made message parsing more robust for a lot of messages.


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


# 84d9f25ac5251f14840d94341aef0b63bebfaad7 26-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

The thread renaming was broken under R5. Cleaned it up a little.


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


# d2e5d36050be03f6ea757acfe3250ebc9e57bc3b 23-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

fMenuSem was not initialized, and therefore, the window tried to delete some
arbitrary semaphore on destruction.


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


# 8eee00f687bcc8070574cc20a51b015c372c2947 22-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

No longer draws hidden views (the app_server still handles them wrong, though,
when they are hidden while being attached to the window).
DrawAfterChildren() is now called at the appropriate place.


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


# 4d670342268c6e2e307ee825e246c23b524af4f1 15-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

a new graphics state is pushed before calling BView::Draw() and popped after it. So any state changes you do in your Draw() function will be forgotton when you're done, as on R5. I have not done a lot of testing for bugs in the state stack within the app_server though...

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


# dd10337fd005a67a4947714fdeecf2121485b91d 14-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed BAppServerLink to AppServerLink, BPortLink to PortLink, LinkMsgReader
to LinkReceiver, LinkMsgSender to LinkSender, and put everything into the
BPrivate namespace.
Made AppServerLink a cheap object - it will use the applications receiver/sender
and not create its own buffers.
Fixed broken communication stuff here and there (mostly Font.cpp).
Put the newly introduced set|get_system_colors() into the BPrivate namespace -
please don't introduce private functions into the public namespace!!!
Also fixed their broken communication use, as Darkwyrm obviously forgot about
it again: the sequence Flush(); GetNextMessage() without error checking is
purely wrong and can make the app hang and/or crash! :-)
Other minor cleanup.
The input_server used some test mode with the haiku build target which is
probably wrong.
Hopefully I did not forget anything this time.


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


# aa6f42c954dad57234895e4fbd55df984d4a505f 12-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

DispatchMessage() is called with the looper already locked, so we call fLink->Flush() directly, which does not lock it again. Changed some TODO to be more informative, removed one.

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


# 9b7978ffe603eb62b31660d714070f3c9972a29d 11-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

No need to Lock()/Unlock() as Flush() does it already. Sync() wouldn't have unlocked the window in case FlushWithReply() wouldn't succeed.

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


# 56efd1ace866abf36b69143484c8b91b4f46d5de 11-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

Sometimes I have seen crashes in BWindow::determine_target(), and this could very well fix it.

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


# 95c58faa2db626bf8cf9d2b91c7d28e035578863 11-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Now we flush the command buffer after handling a B_PULSE message. This fixes the PulseTest (and probably some other things).

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


# 75936a02e432bb4ceb04494f0d53eb4d10ac7764 07-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

BPortLink now has a FlushWithReply() method itself.
BPortLink::AttachString() now accepts a length argument, and will no longer
send a terminating null byte; LinkMsgReader::ReadString(), however, will
make sure the string read is null terminated.
Changed client communication code to use FlushWithReply() instead of Flush()
and GetNextReply() - there were many bugs and shortcomings in the code, I
hope I've fixed them all.
Converted ClientFontList.cpp to our coding style (but not completely, the
class members are missing).
Some more cleanup - I hope Adi will adopt our coding style one day!


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


# 442992bf26284b4cb771ead1332124f3502e4781 07-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

fixed some pretty bad bugs that prevented menus from working (they now do): The BMessage* in AddShortcut is taken in responsibility by the BWindow, so we cannot directly use the message from BMenuItem, the be_app was locked in InitData but never unlocked, it fixes BMenus only working once, and who knows what else it fixes. A little cleanup with _BCmdKey usage, also note that it is inefficient to RemoveItem()s from a list in the destructor of any class using a BList as data container! Simply delete the items and be done with it. The BList destructor will take care of the rest and free its storage in one go.

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


# e17b33e56b74c192b47ed694aa367c56a816eb2a 05-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

The window was removing the app_server connection too early, and thus hang in Quit().
Removed the stopConnection() method.
Cleaned up header a bit.


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


# 59345e264fccac812b03a49a1e4466f10133a309 03-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

huge cleanup, support for SetSizeLimits, support for truncating strings, numerous decorator bug fixes, Layer does not draw when view color is B_TRANSPARENT_COLOR, cleaner dispatching of mouse events to the WinBorder in RootLayer, commented the char map selection in the font server, as it seems glyph lookup by unicode index works much better with the default map

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


# b9b38bc7b2c2cb4b8fc58bd9cc8dd79c38296cf6 03-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed build with debug enabled. Renamed a static variable.

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


# 38b35d9caa2505146411842de6734e0a3b5031df 29-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

BBitmap now uses the correct (private) BWindow constructor. Partially implemented that constructor. Fixed another typo in BView, verified and removed some TODOs

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


# 87ab5d5c6d8b50803bad5b0e02284b71fa7fa528 23-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Now we delete the menu semaphore in the window's destructor

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


# 25500bdfd925317645cdbd9185ba6e47a546b838 19-May-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed BWindow::UpdateIfNeeded() by moving the code from BView::GetMouse() over.
GetMouse() will now just call UpdateIfNeeded().


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


# bcd8a1fad9690515c79ba43e37050a38df57e228 18-May-2005 Axel Dörfler <axeld@pinc-software.de>

Converted Window.cpp to our coding style guide and (unfortunately) fixed a
myriad of small bugs here and there, as well as some very odd coding techniques:
- the "Minimize" property was not handled
- the "Minimize" property was not settable
- the property/scripting stuff was horrible, anyway
- there are more and better error codes than B_ERROR (could someone tell the
app_server guys? :))
- added some ToDo items here and there
- and much more I don't remember


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


# 3405fff2a98a18cec5630ab1003f3f0a6193865f 18-May-2005 Axel Dörfler <axeld@pinc-software.de>

Implemented private function BWindow::DequeueAll() which reads all pending
messages from the port.
BView::GetMouse() now calls this function if it was called from the window's
thread and thus blocking the message loop.


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


# ad6b480400e921f46a444359fc92be5251ab6ac4 16-May-2005 Stephan Aßmus <superstippi@gmx.de>

Work in Progress. The server keeps the client window up to date on layer movement/resizing. This fixes quite a few problems and brings support for FrameMoved and Resized hooks. But implementing it this way has its own set of problem, most importantly: When a BView calles Window()->CurrentMessage() in its FrameMoved/Resized hooks, it will see something very different from what it would see in R5. This needs to be fixed, but I have not had a good idea how to do this other than faking the current message in BWindow, which I didn't look into.

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


# d557af5b96ebfb1995761dc0104cd5cd693e5ff3 16-May-2005 Stephan Aßmus <superstippi@gmx.de>

Fixes to my fixes of BView::MakeFocus(), the previous focus BView needs to be unfocused of course so the derived classes implementation gets called. Simplified BWindow::setFocus(). BView calls FrameResized() and FrameMoved() if it has no parent, I don't know how R5 handles it, but I added a TODO...

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


# 7bdfb0d99625d15016689dee86d3815872c219e9 07-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added handler for _MENUS_DONE_

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


# fc726990718ecd29e717395e29e6875ccc3940be 03-May-2005 Stephan Aßmus <superstippi@gmx.de>

added some safety checks, cosmetic changes - please note that it is safe to call delete with a NULL pointer, unlike free(), so please don't clutter the code

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


# 1596a167c0c7cd591f8817db58c6ef0d02f9375e 28-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

work around for layers not being moved that have not yet been added to the tree. See WinBorder::MoveTo for the explaination. The same problem should be at other places and most likely for normal views as well. This fixes BWindow::MoveXX() when it is not yet Show()n

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


# 9715a3e1bf95ffe0cc6d96ffc1c2588e84477b6b 27-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

fixed BWindow::MoveXX(), BWindow::ResizeXX() and BView::ConvertToScreen()

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


# 35055741647b0d5b499d0a0a46da5e2172a003fa 27-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

Added some TODO comments in Window.cpp, improved coordinate conversion in View.cpp. I'm not sure if this really works correctly, I need to write more tests. The scrolling test actually does more of what it is supposed to. At least the scrolling properly follows the mouse now. Missing are the movement of child views, the rebuilding of clipping, and I think that the scrolling needs to be synced to update requests having been fullfilled, or else some parts of the View will be CopyBits()ed which have not been drawn after having been scrolled into view by previous calls to ScrollBy(). Any insights appreciated.

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


# 28930a1240a314a0d984c70368ec83aa5d329272 27-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

small changes and fixes here and there

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


# 6141cc1d5a302767995469d9ab12eac11291e2ea 21-Apr-2005 Adi Oanca <adioanca@nowhere.fake>

Adjusted SetFeel() to current server implementation

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


# e86740b699635deb43700da4c2d41f48eb25e816 14-Apr-2005 Adi Oanca <adioanca@nowhere.fake>

Forward message to the handler set inside task_looper() no to fFocus

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


# 94b849e1e2084dcea195fba7f0e4b088de3d9e85 14-Apr-2005 Adi Oanca <adioanca@nowhere.fake>

No more B_MESSAGE_NOT_UNDERSTOOD on B_UNMAPPED_KEY_DOWN, B_UNMAPPED_KEY_UP, B_MODIFIERS_CHANGED events

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


# be9241bf1710ef84c56875404a9f80aca11781d3 10-Apr-2005 Adi Oanca <adioanca@nowhere.fake>

Added server support for Workspaces() and SetWorkspaces()

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


# 9f7e77bd635a73d21360d5fba89044e6f4ff7f17 31-Mar-2005 Adi Oanca <adioanca@nowhere.fake>

Forgot a warning message

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


# 52bd978684ee34398b7934ed07f5e31a3ac48753 31-Mar-2005 Adi Oanca <adioanca@nowhere.fake>

Send only one AS_BEGIN/END_UPDATE message, not for every view

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


# 3c46b748954ededb383827eeaf8df95da6a99dd6 27-Mar-2005 Michael Lotz <mmlr@mlotz.ch>

Remove debug leftover.

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


# cd970020cbad74b8c1188366a7a352f8510191e3 27-Mar-2005 Michael Lotz <mmlr@mlotz.ch>

Implement the BWindow::task_loop again. I know that this is code duplication, but look at
the TODO item for an explanation. We could do this as a hack in Looper.cpp though.
Also implement the determine_target function (incomplete).


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


# 27e3da2face37d42782fa3b6c7d3f1370c075fcd 26-Mar-2005 Adi Oanca <adioanca@nowhere.fake>

BWindow's frame events hooks work now. Frame gets updated on window move/resize.

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


# ed16bb7885383c0cfc474b7c72b873fdf0db97ba 26-Mar-2005 Michael Lotz <mmlr@mlotz.ch>

Fix KeyDown/KeyUp calls so that we don't always get numBytes = 0.

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


# 642d7ca95ecc94f0033ff7e34fb04d27f4313104 21-Mar-2005 Adi Oanca <adioanca@nowhere.fake>

Implemented BView::SetEventMask()

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


# 494d1b2a5a71d19b6eb677a9f6bd65d41e4ff5aa 17-Mar-2005 Adi Oanca <adioanca@nowhere.fake>

This fixes a problem with window's contents not being redrawn after a Show(), Hide and Show() again

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


# f51f1dda88d03e653c2ab9ad763091ef7f30e823 05-Mar-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed some weird includes (no need or even support to specify "posix" as part of the include path).


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


# 7b76dd8073c96589f87073e164f98ce940de909c 06-Feb-2005 Adi Oanca <adioanca@nowhere.fake>

mouse & keyboard messages now use the full power of application_kit


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


# 79c8040e93e48850ad135e1ef7d281dbb7f8e504 03-Feb-2005 Adi Oanca <adioanca@nowhere.fake>

BView::MouseUp/KeyDown/KeyUp() hook methods are called for the BView for which the action takes place


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


# 0e835651a52220dd415c00812fd5d01ae3af3baa 03-Feb-2005 Adi Oanca <adioanca@nowhere.fake>

BView::MouseDown() finally gets called


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


# 6e8a11dda4258b35eebcbb6b68e9b89081bb4774 21-Jan-2005 Adi Oanca <adioanca@nowhere.fake>

Keyboard messages are dispached to BWindow's handler if no focus view


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


# e09fd76fe648cfa4385591b85213eb8bf0530832 06-Nov-2004 DarkWyrm <darkwyrm@gmail.com>

Added some changes for the new mouse wheel support


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


# f9ed3ba7d5ad6a4a56c1ca1787ac6c8efbfd3089 21-Aug-2004 DarkWyrm <darkwyrm@gmail.com>

Fixed a stupid mistake in the message to create a window


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


# 38e110b12471ed04e0818ca31c85619880290a5c 08-Aug-2004 DarkWyrm <darkwyrm@gmail.com>

Client-server messaging fixes


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


# f073f5d156cad8b2e185dc37cab20b5179fa1d6d 02-Aug-2004 haydentech <haydentech@nowhere.fake>

Fix 2 instances of mismatched locking


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


# 3ceb31b96aefa3601ccc51e415da557b00155d4f 30-Jul-2004 DarkWyrm <darkwyrm@gmail.com>

Pahtz's changes from PortLink/BSession/PortMessage/PortQueue to BPortLink


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


# 26b5401027b198700ec4cdc99a619d5368609a88 14-Jul-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added implementation of _set_menu_sem_() to Window.cpp (should it go to a different place ?), thus fixing the build (at least here, I hope I didn't forget anything else).
Thanks to Bill Hayden for reporting and sorry again for the trouble.
Changed a comment in PopUpMenu.cpp


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


# 7c680a3569ca25326495925f73435a88eaaa9e8f 05-Jul-2004 Adi Oanca <adioanca@nowhere.fake>

Implemented a method for the update process. Rearanged some code.


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


# 71786a380c050aa4d5786de398f72399b95408c4 27-Jun-2004 Axel Dörfler <axeld@pinc-software.de>

Added missing private AddShortcut variant.
Minor style update.


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


# 5b7dc94cde6a877c59521998e339f82152e5b826 19-Jun-2004 Adi Oanca <adioanca@nowhere.fake>

chnaged a mesage code


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


# 5929c56ed0c40e4b46a02c444dbe1a7a015b49fe 18-Jun-2004 Adi Oanca <adioanca@nowhere.fake>

::MoveBy() fixed.


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


# 1889be2a4d87264f9978357a98f471dc3514141f 18-Jun-2004 Adi Oanca <adioanca@nowhere.fake>

hidden state was wrongly reported


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


# a3c6cfb7b774dead48397f768d035a5fc0dd8913 17-Jun-2004 Adi Oanca <adioanca@nowhere.fake>

Changed internal protocol. Ha ha. Just deleted a line. :-)))


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


# f23d8d621670b6b7384c90eb660ebb123e46fbc0 16-Jun-2004 Adi Oanca <adioanca@nowhere.fake>

Major code cleanup


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


# d7113e23eb190edc200a306b210b72ba3cf7feff 16-May-2004 Adi Oanca <adioanca@nowhere.fake>

modified Resize methods


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


# 7a71a81c84e049e859995d2e7f4299c18687785c 03-Apr-2004 Adi Oanca <adioanca@nowhere.fake>

modified the way top_view sends its data to app_server. It now send _all_ is data


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


# a7d9589ff25c1965fe938576c9be673fcf83e3ab 28-Mar-2004 Adi Oanca <adioanca@nowhere.fake>

* Modified a little the protocol for AS_LAYER_CREATE_ROOT message. Replaced PortLink with BSession. Was
necessary!


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


# 1660ace4883dc487e1f9793f5696ac42cde87ee5 17-Jan-2004 Adi Oanca <adioanca@nowhere.fake>

added a member in a message


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


# 7473eb7db8163f65c9a30d6d3009ef59a953d4d1 16-Jan-2004 Adi Oanca <adioanca@nowhere.fake>

added a memeber to a server message


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


# 533c9ed801f351fb68cb520a8c11fd480d18fa83 13-Jan-2004 Adi Oanca <adioanca@nowhere.fake>

changed and if statement in AddToSubset


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


# 07e5e0d1a202d4f4d9feec1ca30b061ab7116203 12-Jan-2004 Adi Oanca <adioanca@nowhere.fake>

modified so use BSession again
various fixes especialy regarding app_server connection


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


# 5936e650505cdd0b1b355610187d137b06258542 07-Dec-2003 DarkWyrm <darkwyrm@gmail.com>

Converted a lot of BSession use to PortLink where streamed messaging is not appropriate


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


# 60c2633d9f3f5cb537bd5a080a3981f4a506686d 06-Dec-2003 DarkWyrm <darkwyrm@gmail.com>

Removed use of BSession in constructor - conversion to using a BAppServerLink.
BSession streams are not meant for this kind of use


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


# 84e57fc918919a6fbd0bd05e4b898c129f27c48d 10-Nov-2003 haydentech <haydentech@nowhere.fake>

Fix line array bugs, missing breaks, gcc3 incompatibilities, and a few typos


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


# da024ab387cbd391ae7329ad68239dc7b5232809 24-Sep-2003 Adi Oanca <adioanca@nowhere.fake>

*modified ReadRawFromPort() and ConvertToMessage() methods to use BSession class.
*modified/added B_VIEW_(MOVED/RESIZED) handlers in ConvertToMessage()/DispatchMessage()


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


# b81089db11f51a689c456a2c719b433d6e22f344 15-Sep-2003 Adi Oanca <adioanca@nowhere.fake>

* made fLastViewToken member equal with top_view's token. This avoids an unnecessary message to be sent to app_server.
* added some debugging code?
* other changes...


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


# c73714dbb4bfebad6aa0a0f93f15bf7e00c5bf5f 08-Sep-2003 Adi Oanca <adioanca@nowhere.fake>

some appserver connection code


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


# 072a83e4b9a9755d2fa036362142f3ad372baf75 03-Sep-2003 Adi Oanca <adioanca@nowhere.fake>

changed to avoid some compiler warnings


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


# bf17b6ac9529edf55832f4f222ffa919befc46d6 31-Aug-2003 Adi Oanca <adioanca@nowhere.fake>

Modified to use the new BSession class


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


# dfa226a10122758ca3e9ef387a495c26e392cb15 24-Jul-2003 DarkWyrm <darkwyrm@gmail.com>

WindowLookToInteger and WindowFeelToInteger return the values specified in R5's Window.h


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


# 19de29789adf647cfc61394318dbd4c74e59dbc7 11-Jul-2003 shadow303 <shadow303@nowhere.fake>

Updates for changes in PortLink & PortMessage


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


# 3bc6d6c59a84213259bf4179c6296400a1e4cfe9 04-Jul-2003 shadow303 <shadow303@nowhere.fake>

gcc 3 fixes


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


# 3aa0c906ba47095bf95f2ed822a2ae9939ba1c7b 25-Jun-2003 haydentech <haydentech@nowhere.fake>

Fixed a crasher in setFocus() and some dead code in ResizeTo()


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


# 6ef98483f5be0420458c93e50284a8a545cbc604 23-Jun-2003 DarkWyrm <darkwyrm@gmail.com>

Removed some bugs to allow the server to run. We can now display (but not play with) a real BWindow!


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


# 40ceba30d6b162a3a59501900e73f236ccac92ab 03-Jun-2003 haydentech <haydentech@nowhere.fake>

Janitorial work and gcc3-related fixes


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


# 1b7390044f43f9b85007a90b56fa18880972d064 17-Apr-2003 DarkWyrm <darkwyrm@gmail.com>

Checkin for Adrian Oanca


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


# f8931e9215937e26324537b7b27fcc403040ff0b 30-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Removed a linker error caused by the restructuring of the BMessage sources


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


# df8d45f7f37273586ca1e5715621ac6af137fdad 23-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

A few bugfixes to allow for simple app_server testing


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


# 2be975a1ee45252030a95af2f21b720eeae12b1e 19-Mar-2003 ejakowatz <ejakowatz@nowhere.fake>

_get_object_token_ has found its permanent home in AppMisc.h, which the
other files were modified to include.


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


# c503a7bc9c91b1a76552185dd56458b6f26d48be 18-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Added BHandler tokens to app_server communications setup


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


# 6c69f6e9c3fd66c2a47bf813b0770ca6adbdd7fc 14-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Check-in for Adrian Oanca - some serious code coming in!!


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


# 2d51f602e91b0694293b916017ebbf8b5a9db395 12-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

More tweaks to talk to server betted in the constructor
Fleshed out a couple message-handling routines to better be able to debug server


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


# ea4ea97733af3c9c7148299c39e17a51f8793920 12-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Window now talks nice-nice to app_server


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


# 0d97724c61c4610e771e763df5c8fb1da7a38d8d 11-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Modified to utilize member PortLink instead of creating new ones


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


# 364bb57e766ce59a1ab1b1bb85a9257df69d127c 24-Feb-2003 DarkWyrm <darkwyrm@gmail.com>

Updated sources to reflect changes in <ServerProtocol.h>


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


# 2dc78c1fc19ef5ad91d17410721be64cc9313f92 24-Nov-2002 DarkWyrm <darkwyrm@gmail.com>

#Include tweaks


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


# 380f52921d74a7d2efd9aa22bf699f8a60aab3f6 23-Nov-2002 DarkWyrm <darkwyrm@gmail.com>

Adding initial BWindow implementation by John Hedditch


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