* Added changing the looks, too, which shows some more problems.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32470 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -3,8 +3,7 @@ SubDir HAIKU_TOP src tests servers app window_invalidation ;
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
AddSubDirSupportedPlatforms libbe_test ;
|
||||
|
||||
UseHeaders [ FDirName os app ] ;
|
||||
UseHeaders [ FDirName os interface ] ;
|
||||
UsePrivateHeaders interface ;
|
||||
|
||||
Application WindowInvalidation :
|
||||
WindowInvalidation.cpp
|
||||
|
||||
@@ -7,13 +7,14 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <Application.h>
|
||||
#include <MessageRunner.h>
|
||||
#include <Window.h>
|
||||
#include <View.h>
|
||||
|
||||
//#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <WindowPrivate.h>
|
||||
|
||||
|
||||
class ShowInvalidationView : public BView {
|
||||
@@ -108,7 +109,7 @@ void
|
||||
ChangingWindow::MessageReceived(BMessage* message)
|
||||
{
|
||||
if (message->what == 'actn') {
|
||||
switch (rand() % 3) {
|
||||
switch (rand() % 4) {
|
||||
case 0:
|
||||
{
|
||||
// resize window
|
||||
@@ -147,6 +148,17 @@ ChangingWindow::MessageReceived(BMessage* message)
|
||||
SetTitle(kChoices[rand() % (sizeof(kChoices) / sizeof(char*))]);
|
||||
break;
|
||||
}
|
||||
|
||||
case 3:
|
||||
{
|
||||
// change look
|
||||
static const window_look kLooks[]
|
||||
= {B_TITLED_WINDOW_LOOK, B_DOCUMENT_WINDOW_LOOK,
|
||||
B_FLOATING_WINDOW_LOOK, kLeftTitledWindowLook};
|
||||
|
||||
SetLook(kLooks[rand() % (sizeof(kLooks) / sizeof(kLooks[0]))]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else
|
||||
BWindow::MessageReceived(message);
|
||||
|
||||
Reference in New Issue
Block a user