* When switching modifiers, the source key was not invalidated, making it appear

as if a copy happened. This closes bug #4242.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32490 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2009-08-18 12:03:12 +00:00
parent 85e4dd94e6
commit c5bf61690a
2 changed files with 13 additions and 8 deletions

View File

@ -27,7 +27,8 @@ static const rgb_color kLitIndicatorColor = {116, 212, 83, 255};
KeyboardLayoutView::KeyboardLayoutView(const char* name)
: BView(name, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE | B_FRAME_EVENTS),
:
BView(name, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE | B_FRAME_EVENTS),
fOffscreenBitmap(NULL),
fKeymap(NULL),
fEditable(true),
@ -236,7 +237,7 @@ KeyboardLayoutView::MouseMoved(BPoint point, uint32 transit,
if (fKeymap == NULL)
return;
// rule out dragging for tertiary mouse button
// prevent dragging for tertiary mouse button
if ((fButtons & B_TERTIARY_MOUSE_BUTTON) != 0)
return;
@ -470,6 +471,8 @@ KeyboardLayoutView::MessageReceived(BMessage* message)
fKeymap->Modifier(fDropTarget->code));
fKeymap->SetModifier(fDropTarget->code, modifier);
}
_InvalidateKey(fDragKey);
}
_InvalidateKey(fDropTarget);

View File

@ -9,6 +9,7 @@
* Axel Dörfler, axeld@pinc-software.de.
*/
#include "KeymapWindow.h"
#include <string.h>
@ -62,7 +63,8 @@ static const char* kCurrentKeymapName = "(Current)";
KeymapWindow::KeymapWindow()
: BWindow(BRect(80, 50, 880, 380), "Keymap", B_TITLED_WINDOW,
:
BWindow(BRect(80, 50, 880, 380), "Keymap", B_TITLED_WINDOW,
B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS)
{
SetLayout(new BGroupLayout(B_VERTICAL));