|
@@ -28,6 +28,8 @@ |
|
|
// ----------------------------------------------------- |
|
|
// ----------------------------------------------------- |
|
|
// X11 |
|
|
// X11 |
|
|
|
|
|
|
|
|
|
|
|
static const int X11Key_Escape = 9; |
|
|
|
|
|
|
|
|
class X11PluginUi : public CarlaPluginUi |
|
|
class X11PluginUi : public CarlaPluginUi |
|
|
{ |
|
|
{ |
|
|
public: |
|
|
public: |
|
@@ -57,6 +59,8 @@ public: |
|
|
|
|
|
|
|
|
CARLA_SAFE_ASSERT_RETURN(fWindow != 0,); |
|
|
CARLA_SAFE_ASSERT_RETURN(fWindow != 0,); |
|
|
|
|
|
|
|
|
|
|
|
XGrabKey(fDisplay, X11Key_Escape, AnyModifier, fWindow, 1, GrabModeAsync, GrabModeAsync); |
|
|
|
|
|
|
|
|
Atom wmDelete = XInternAtom(fDisplay, "WM_DELETE_WINDOW", True); |
|
|
Atom wmDelete = XInternAtom(fDisplay, "WM_DELETE_WINDOW", True); |
|
|
XSetWMProtocols(fDisplay, fWindow, &wmDelete, 1); |
|
|
XSetWMProtocols(fDisplay, fWindow, &wmDelete, 1); |
|
|
|
|
|
|
|
@@ -137,8 +141,7 @@ public: |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
case KeyRelease: |
|
|
case KeyRelease: |
|
|
//carla_stdout("got key release %i", event.xkey.keycode); |
|
|
|
|
|
if (event.xkey.keycode == 9) // Escape |
|
|
|
|
|
|
|
|
if (event.xkey.keycode == X11Key_Escape) |
|
|
{ |
|
|
{ |
|
|
fIsVisible = false; |
|
|
fIsVisible = false; |
|
|
CARLA_SAFE_ASSERT_CONTINUE(fCallback != nullptr); |
|
|
CARLA_SAFE_ASSERT_CONTINUE(fCallback != nullptr); |
|
|