* 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:
parent
85e4dd94e6
commit
c5bf61690a
@ -27,7 +27,8 @@ static const rgb_color kLitIndicatorColor = {116, 212, 83, 255};
|
|||||||
|
|
||||||
|
|
||||||
KeyboardLayoutView::KeyboardLayoutView(const char* name)
|
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),
|
fOffscreenBitmap(NULL),
|
||||||
fKeymap(NULL),
|
fKeymap(NULL),
|
||||||
fEditable(true),
|
fEditable(true),
|
||||||
@ -236,7 +237,7 @@ KeyboardLayoutView::MouseMoved(BPoint point, uint32 transit,
|
|||||||
if (fKeymap == NULL)
|
if (fKeymap == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// rule out dragging for tertiary mouse button
|
// prevent dragging for tertiary mouse button
|
||||||
if ((fButtons & B_TERTIARY_MOUSE_BUTTON) != 0)
|
if ((fButtons & B_TERTIARY_MOUSE_BUTTON) != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -470,6 +471,8 @@ KeyboardLayoutView::MessageReceived(BMessage* message)
|
|||||||
fKeymap->Modifier(fDropTarget->code));
|
fKeymap->Modifier(fDropTarget->code));
|
||||||
fKeymap->SetModifier(fDropTarget->code, modifier);
|
fKeymap->SetModifier(fDropTarget->code, modifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_InvalidateKey(fDragKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
_InvalidateKey(fDropTarget);
|
_InvalidateKey(fDropTarget);
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
* Axel Dörfler, axeld@pinc-software.de.
|
* Axel Dörfler, axeld@pinc-software.de.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "KeymapWindow.h"
|
#include "KeymapWindow.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -62,7 +63,8 @@ static const char* kCurrentKeymapName = "(Current)";
|
|||||||
|
|
||||||
|
|
||||||
KeymapWindow::KeymapWindow()
|
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)
|
B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS)
|
||||||
{
|
{
|
||||||
SetLayout(new BGroupLayout(B_VERTICAL));
|
SetLayout(new BGroupLayout(B_VERTICAL));
|
||||||
@ -311,7 +313,7 @@ KeymapWindow::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
case kMsgDeadKeyAcuteChanged:
|
case kMsgDeadKeyAcuteChanged:
|
||||||
{
|
{
|
||||||
BMenuItem *item = fAcuteMenu->FindMarked();
|
BMenuItem* item = fAcuteMenu->FindMarked();
|
||||||
if (item != NULL) {
|
if (item != NULL) {
|
||||||
const char* trigger = item->Label();
|
const char* trigger = item->Label();
|
||||||
if (strcmp(trigger, kDeadKeyTriggerNone) == 0)
|
if (strcmp(trigger, kDeadKeyTriggerNone) == 0)
|
||||||
@ -324,7 +326,7 @@ KeymapWindow::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
case kMsgDeadKeyCircumflexChanged:
|
case kMsgDeadKeyCircumflexChanged:
|
||||||
{
|
{
|
||||||
BMenuItem *item = fCircumflexMenu->FindMarked();
|
BMenuItem* item = fCircumflexMenu->FindMarked();
|
||||||
if (item != NULL) {
|
if (item != NULL) {
|
||||||
const char* trigger = item->Label();
|
const char* trigger = item->Label();
|
||||||
if (strcmp(trigger, kDeadKeyTriggerNone) == 0)
|
if (strcmp(trigger, kDeadKeyTriggerNone) == 0)
|
||||||
@ -337,7 +339,7 @@ KeymapWindow::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
case kMsgDeadKeyDiaeresisChanged:
|
case kMsgDeadKeyDiaeresisChanged:
|
||||||
{
|
{
|
||||||
BMenuItem *item = fDiaeresisMenu->FindMarked();
|
BMenuItem* item = fDiaeresisMenu->FindMarked();
|
||||||
if (item != NULL) {
|
if (item != NULL) {
|
||||||
const char* trigger = item->Label();
|
const char* trigger = item->Label();
|
||||||
if (strcmp(trigger, kDeadKeyTriggerNone) == 0)
|
if (strcmp(trigger, kDeadKeyTriggerNone) == 0)
|
||||||
@ -350,7 +352,7 @@ KeymapWindow::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
case kMsgDeadKeyGraveChanged:
|
case kMsgDeadKeyGraveChanged:
|
||||||
{
|
{
|
||||||
BMenuItem *item = fGraveMenu->FindMarked();
|
BMenuItem* item = fGraveMenu->FindMarked();
|
||||||
if (item != NULL) {
|
if (item != NULL) {
|
||||||
const char* trigger = item->Label();
|
const char* trigger = item->Label();
|
||||||
if (strcmp(trigger, kDeadKeyTriggerNone) == 0)
|
if (strcmp(trigger, kDeadKeyTriggerNone) == 0)
|
||||||
@ -363,7 +365,7 @@ KeymapWindow::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
case kMsgDeadKeyTildeChanged:
|
case kMsgDeadKeyTildeChanged:
|
||||||
{
|
{
|
||||||
BMenuItem *item = fTildeMenu->FindMarked();
|
BMenuItem* item = fTildeMenu->FindMarked();
|
||||||
if (item != NULL) {
|
if (item != NULL) {
|
||||||
const char* trigger = item->Label();
|
const char* trigger = item->Label();
|
||||||
if (strcmp(trigger, kDeadKeyTriggerNone) == 0)
|
if (strcmp(trigger, kDeadKeyTriggerNone) == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user