blob: e28034876a38b120173c51ad11733c0344be1f60 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
/*
* Matchbox Keyboard - A lightweight software keyboard.
*
* Authored By Matthew Allum <mallum@o-hand.com>
*
* Copyright (c) 2007-2012 Intel Corp
*
* SPDX-License-Identifier: LGPL-2.1
*
*/
#include "matchbox-keyboard.h"
#include "matchbox-keyboard-remote.h"
static Atom Atom_MB_IM_INVOKER_COMMAND;
void
mb_kbd_remote_init (MBKeyboardUI *ui)
{
Atom_MB_IM_INVOKER_COMMAND = XInternAtom(mb_kbd_ui_x_display(ui),
"_MB_IM_INVOKER_COMMAND", False);
}
MBKeyboardRemoteOperation
mb_kbd_remote_process_xevents (MBKeyboardUI *ui, XEvent *xevent)
{
DBG("got a message\n");
switch (xevent->type)
{
case ClientMessage:
DBG("is a Client Message\n");
if (xevent->xclient.message_type == Atom_MB_IM_INVOKER_COMMAND)
{
DBG("got a message of type _MB_IM_INVOKER_COMMAND, val %lu\n",
xevent->xclient.data.l[0]);
return xevent->xclient.data.l[0];
}
}
return MBKeyboardRemoteNone;
}
|