summaryrefslogtreecommitdiff
path: root/core
authorsandman <sandman>2002-06-20 17:36:21 (UTC)
committer sandman <sandman>2002-06-20 17:36:21 (UTC)
commitfd64293dbcfae3bcf3265e31fbe847ac86b2a0af (patch) (side-by-side diff)
tree77b9541ed66bf6cc388da18cc7cdbe463cc2930e /core
parent0996b7f1bcbdb05db00eadb0cdd60b2066cdd899 (diff)
downloadopie-fd64293dbcfae3bcf3265e31fbe847ac86b2a0af.zip
opie-fd64293dbcfae3bcf3265e31fbe847ac86b2a0af.tar.gz
opie-fd64293dbcfae3bcf3265e31fbe847ac86b2a0af.tar.bz2
virtual key events should use sendKeyEvent, not processKeyEvents
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/clipboardapplet/clipboard.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/applets/clipboardapplet/clipboard.cpp b/core/applets/clipboardapplet/clipboard.cpp
index cd4f61c..203e23e 100644
--- a/core/applets/clipboardapplet/clipboard.cpp
+++ b/core/applets/clipboardapplet/clipboard.cpp
@@ -118,60 +118,60 @@ static const char * paste_xpm[] = {
ClipboardApplet::ClipboardApplet( QWidget *parent, const char *name ) : QWidget( parent, name )
{
setFixedWidth ( 14 );
setFixedHeight ( 18 );
clipboardPixmap = QPixmap ( paste_xpm );
menu = 0;
}
ClipboardApplet::~ClipboardApplet ( )
{
}
void ClipboardApplet::mousePressEvent ( QMouseEvent *)
{
if ( !menu ) {
menu = new QPopupMenu ( this );
menu-> insertItem ( QIconSet ( Resource::loadPixmap ( "cut" )), tr( "Cut" ), 0 );
menu-> insertItem ( QIconSet ( Resource::loadPixmap ( "copy" )), tr( "Copy" ), 1 );
menu-> insertItem ( QIconSet ( Resource::loadPixmap ( "paste" )), tr( "Paste" ), 2 );
connect ( menu, SIGNAL( activated ( int )), this, SLOT( action ( int )));
}
QPoint p = mapToGlobal ( QPoint ( 0, 0 ));
QSize s = menu-> sizeHint ( );
menu-> popup ( QPoint ( p. x ( ) + ( width ( ) / 2 ) - ( s. width ( ) / 2 ), p. y ( ) - s. height ( )));
}
void ClipboardApplet::action(int id)
{
ushort unicode=0;
int scan=0;
switch ( id ) {
case 0:
unicode='X'-'@';
scan=Key_X; // Cut
break;
case 1:
unicode='C'-'@';
scan=Key_C; // Copy
break;
case 2:
unicode='V'-'@';
scan=Key_V; // Paste
break;
}
if ( scan ) {
- qwsServer->processKeyEvent( unicode, scan, ControlButton, TRUE, FALSE );
- qwsServer->processKeyEvent( unicode, scan, ControlButton, FALSE, FALSE );
+ qwsServer-> sendKeyEvent ( unicode, scan, ControlButton, true, false );
+ qwsServer-> sendKeyEvent ( unicode, scan, ControlButton, true, false );
}
}
void ClipboardApplet::paintEvent ( QPaintEvent* )
{
QPainter p ( this );
p. drawPixmap ( 0, 1, clipboardPixmap );
}