X11: Don't use a client event as a wrapper for XMoveResizeWindow
Simply configure the window from here
This commit is contained in:
parent
ca97b10dda
commit
01ff85506d
|
@ -795,8 +795,10 @@ void CFrame::OnRenderParentResize(wxSizeEvent& event)
|
||||||
}
|
}
|
||||||
#if defined(HAVE_X11) && HAVE_X11
|
#if defined(HAVE_X11) && HAVE_X11
|
||||||
wxRect client_rect = m_RenderParent->GetClientRect();
|
wxRect client_rect = m_RenderParent->GetClientRect();
|
||||||
X11Utils::SendClientEvent(X11Utils::XDisplayFromHandle(GetHandle()),
|
XMoveResizeWindow(X11Utils::XDisplayFromHandle(GetHandle()),
|
||||||
"RESIZE", client_rect.x, client_rect.y, client_rect.width, client_rect.height);
|
X11Utils::XWindowFromHandle(GetHandle()),
|
||||||
|
client_rect.x, client_rect.y,
|
||||||
|
client_rect.width, client_rect.height);
|
||||||
#endif
|
#endif
|
||||||
m_LogWindow->Refresh();
|
m_LogWindow->Refresh();
|
||||||
m_LogWindow->Update();
|
m_LogWindow->Update();
|
||||||
|
|
|
@ -313,11 +313,6 @@ void cX11Window::XEventThread()
|
||||||
if ((unsigned long) event.xclient.data.l[0] ==
|
if ((unsigned long) event.xclient.data.l[0] ==
|
||||||
XInternAtom(GLWin.evdpy, "WM_DELETE_WINDOW", False))
|
XInternAtom(GLWin.evdpy, "WM_DELETE_WINDOW", False))
|
||||||
Host_Message(WM_USER_STOP);
|
Host_Message(WM_USER_STOP);
|
||||||
if ((unsigned long) event.xclient.data.l[0] ==
|
|
||||||
XInternAtom(GLWin.evdpy, "RESIZE", False))
|
|
||||||
XMoveResizeWindow(GLWin.evdpy, GLWin.win,
|
|
||||||
event.xclient.data.l[1], event.xclient.data.l[2],
|
|
||||||
event.xclient.data.l[3], event.xclient.data.l[4]);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -32,26 +32,6 @@ extern char **environ;
|
||||||
namespace X11Utils
|
namespace X11Utils
|
||||||
{
|
{
|
||||||
|
|
||||||
void SendClientEvent(Display *dpy, const char *message,
|
|
||||||
int data1, int data2, int data3, int data4)
|
|
||||||
{
|
|
||||||
XEvent event;
|
|
||||||
Window win = (Window)Core::GetWindowHandle();
|
|
||||||
|
|
||||||
// Init X event structure for client message
|
|
||||||
event.xclient.type = ClientMessage;
|
|
||||||
event.xclient.format = 32;
|
|
||||||
event.xclient.data.l[0] = XInternAtom(dpy, message, False);
|
|
||||||
event.xclient.data.l[1] = data1;
|
|
||||||
event.xclient.data.l[2] = data2;
|
|
||||||
event.xclient.data.l[3] = data3;
|
|
||||||
event.xclient.data.l[4] = data4;
|
|
||||||
|
|
||||||
// Send the event
|
|
||||||
if (!XSendEvent(dpy, win, False, False, &event))
|
|
||||||
ERROR_LOG(VIDEO, "Failed to send message %s to the emulator window.", message);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SendKeyEvent(Display *dpy, int key)
|
void SendKeyEvent(Display *dpy, int key)
|
||||||
{
|
{
|
||||||
XEvent event;
|
XEvent event;
|
||||||
|
|
|
@ -43,8 +43,6 @@
|
||||||
namespace X11Utils
|
namespace X11Utils
|
||||||
{
|
{
|
||||||
|
|
||||||
void SendClientEvent(Display *dpy, const char *message,
|
|
||||||
int data1, int data2, int data3, int data4);
|
|
||||||
void SendKeyEvent(Display *dpy, int key);
|
void SendKeyEvent(Display *dpy, int key);
|
||||||
void SendButtonEvent(Display *dpy, int button, int x, int y, bool pressed);
|
void SendButtonEvent(Display *dpy, int button, int x, int y, bool pressed);
|
||||||
void SendMotionEvent(Display *dpy, int x, int y);
|
void SendMotionEvent(Display *dpy, int x, int y);
|
||||||
|
|
Loading…
Reference in New Issue