diff --git a/plugins/itemfakevim/fakevim/fakevimhandler.cpp b/plugins/itemfakevim/fakevim/fakevimhandler.cpp index 4fc51529a..c28d2504a 100644 --- a/plugins/itemfakevim/fakevim/fakevimhandler.cpp +++ b/plugins/itemfakevim/fakevim/fakevimhandler.cpp @@ -7802,7 +7802,7 @@ void FakeVimHandler::Private::surroundCurrentRange(const Input &input, const QSt newBack += "\n"; else newBack = "\n" + newBack; - } else if (input.is('(') || input.is('{') || input.is('[') || input.is('[')) { + } else if (input.is('(') || input.is('{') || input.is('[')) { // Opening characters add an extra space newFront = newFront + " "; newBack = " " + newBack; diff --git a/src/platform/x11/x11platformclipboard.cpp b/src/platform/x11/x11platformclipboard.cpp index ed8107221..eb3b7dc3f 100644 --- a/src/platform/x11/x11platformclipboard.cpp +++ b/src/platform/x11/x11platformclipboard.cpp @@ -41,14 +41,14 @@ bool isSelectionIncomplete() return false; // If mouse button or shift is pressed then assume that user is selecting text. - XEvent event{}; + XButtonEvent event{}; XQueryPointer(display, DefaultRootWindow(display), - &event.xbutton.root, &event.xbutton.window, - &event.xbutton.x_root, &event.xbutton.y_root, - &event.xbutton.x, &event.xbutton.y, - &event.xbutton.state); + &event.root, &event.window, + &event.x_root, &event.y_root, + &event.x, &event.y, + &event.state); - return event.xbutton.state & (Button1Mask | ShiftMask); + return event.state & (Button1Mask | ShiftMask); #else return true; #endif diff --git a/src/platform/x11/x11platformwindow.cpp b/src/platform/x11/x11platformwindow.cpp index d0937f1d0..140729f04 100644 --- a/src/platform/x11/x11platformwindow.cpp +++ b/src/platform/x11/x11platformwindow.cpp @@ -236,18 +236,18 @@ void X11PlatformWindow::raise() COPYQ_LOG( QString("Raising window \"%1\"").arg(getTitle()) ); - XEvent e{}; + XClientMessageEvent e{}; memset(&e, 0, sizeof(e)); e.type = ClientMessage; - e.xclient.display = display; - e.xclient.window = m_window; - e.xclient.message_type = XInternAtom(display, "_NET_ACTIVE_WINDOW", False); - e.xclient.format = 32; - e.xclient.data.l[0] = 2; - e.xclient.data.l[1] = CurrentTime; - e.xclient.data.l[2] = 0; - e.xclient.data.l[3] = 0; - e.xclient.data.l[4] = 0; + e.display = display; + e.window = m_window; + e.message_type = XInternAtom(display, "_NET_ACTIVE_WINDOW", False); + e.format = 32; + e.data.l[0] = 2; + e.data.l[1] = CurrentTime; + e.data.l[2] = 0; + e.data.l[3] = 0; + e.data.l[4] = 0; XWindowAttributes wattr{}; XGetWindowAttributes(display, m_window, &wattr); @@ -255,7 +255,7 @@ void X11PlatformWindow::raise() if (wattr.map_state == IsViewable) { XSendEvent(display, wattr.screen->root, False, SubstructureNotifyMask | SubstructureRedirectMask, - &e); + reinterpret_cast(&e)); XSync(display, False); XRaiseWindow(display, m_window); XSetInputFocus(display, m_window, RevertToPointerRoot, CurrentTime);