Add Bluetooth audio/HID/discoverability/alias support, fix SD card hotplug & caller ID matching, and expand ReMEdy J2ME JSRs + 64MB GC
This commit is contained in:
1 parent
456d3fbc42
commit
471916424e
51 files changed
+2961
-305
No files matched your search
+45
-1
@@ -1459,7 +1459,7 @@ bool NeoWindow::create(const char* resName, const char* resClass,
|
||||
swa.override_redirect = overrideRedirect ? True : False;
|
||||
swa.background_pixel = 0x222222;
|
||||
swa.border_pixel = 0x005577;
|
||||
swa.event_mask = eventMask | VisibilityChangeMask | FocusChangeMask;
|
||||
swa.event_mask = eventMask | VisibilityChangeMask | FocusChangeMask | ButtonPressMask;
|
||||
|
||||
win = XCreateWindow(
|
||||
dpy, root, x, y, width, height, 0, DefaultDepth(dpy, screen),
|
||||
@@ -2880,6 +2880,50 @@ int neoui_poll_event(int timeout_ms) {
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (ev.type == ButtonPress && ctx->visible) {
|
||||
if (ev.xbutton.button == Button4) {
|
||||
ctx->lastEventKey = NEO_KEY_UP;
|
||||
ctx->lastEventKeysym = XK_Up;
|
||||
ctx->lastEventType = NEO_EV_KEY_PRESS;
|
||||
return NEO_EV_KEY_PRESS;
|
||||
}
|
||||
if (ev.xbutton.button == Button5) {
|
||||
ctx->lastEventKey = NEO_KEY_DOWN;
|
||||
ctx->lastEventKeysym = XK_Down;
|
||||
ctx->lastEventType = NEO_EV_KEY_PRESS;
|
||||
return NEO_EV_KEY_PRESS;
|
||||
}
|
||||
if (ev.xbutton.button == Button3) {
|
||||
ctx->lastEventKey = NEO_KEY_SOFT_RIGHT;
|
||||
ctx->lastEventKeysym = XK_F2;
|
||||
ctx->lastEventType = NEO_EV_SOFTKEY_RIGHT;
|
||||
return NEO_EV_SOFTKEY_RIGHT;
|
||||
}
|
||||
if (ev.xbutton.button == Button1) {
|
||||
int winW = ctx->w ? ctx->w->width : NEO_WIN_W;
|
||||
int winH = ctx->w ? ctx->w->height : NEO_WIN_H;
|
||||
int sbH = NEO_SOFTBAR_H;
|
||||
if (ev.xbutton.y >= winH - sbH) {
|
||||
if (ev.xbutton.x < winW / 3) {
|
||||
ctx->lastEventKey = NEO_KEY_SOFT_LEFT;
|
||||
ctx->lastEventKeysym = XK_F1;
|
||||
ctx->lastEventType = NEO_EV_SOFTKEY_LEFT;
|
||||
return NEO_EV_SOFTKEY_LEFT;
|
||||
}
|
||||
if (ev.xbutton.x > (winW * 2) / 3) {
|
||||
ctx->lastEventKey = NEO_KEY_SOFT_RIGHT;
|
||||
ctx->lastEventKeysym = XK_F2;
|
||||
ctx->lastEventType = NEO_EV_SOFTKEY_RIGHT;
|
||||
return NEO_EV_SOFTKEY_RIGHT;
|
||||
}
|
||||
}
|
||||
ctx->lastEventKey = NEO_KEY_OK;
|
||||
ctx->lastEventKeysym = XK_Return;
|
||||
ctx->lastEventType = NEO_EV_KEY_PRESS;
|
||||
return NEO_EV_KEY_PRESS;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (ev.type == KeyPress || ev.type == KeyRelease) {
|
||||
if (bananarchy::isExternalOverlayOrLockActive(ctx->appName) ||
|
||||
bananarchy::monotonicMs() < ctx->overlayGraceUntilMs) {
|
||||
|
||||
Reference in new issue
Block a user