utils/xcbutils: Don't call toXNative with unsigned integer
Instead use signed integers, to prevent the implicit cast from unsigned integers to qreal. BUG: 482687
This commit is contained in:
parent
b19426879f
commit
ea4fa87bc6
2 changed files with 6 additions and 6 deletions
|
@ -56,7 +56,7 @@ QRectF KWIN_EXPORT nativeFloor(const QRectF &value);
|
|||
static void defineCursor(xcb_window_t window, xcb_cursor_t cursor);
|
||||
static void setInputFocus(xcb_window_t window, uint8_t revertTo = XCB_INPUT_FOCUS_POINTER_ROOT, xcb_timestamp_t time = xTime());
|
||||
static void moveWindow(xcb_window_t window, const QPoint &pos);
|
||||
static void moveWindow(xcb_window_t window, uint32_t x, uint32_t y);
|
||||
static void moveWindow(xcb_window_t window, int32_t x, int32_t y);
|
||||
static void lowerWindow(xcb_window_t window);
|
||||
static void selectInput(xcb_window_t window, uint32_t events);
|
||||
|
||||
|
@ -1653,7 +1653,7 @@ public:
|
|||
void changeProperty(xcb_atom_t property, xcb_atom_t type, uint8_t format, uint32_t length,
|
||||
const void *data, uint8_t mode = XCB_PROP_MODE_REPLACE);
|
||||
void deleteProperty(xcb_atom_t property);
|
||||
void setBorderWidth(uint32_t width);
|
||||
void setBorderWidth(int32_t width);
|
||||
void grabButton(uint8_t pointerMode, uint8_t keyboardmode,
|
||||
uint16_t modifiers = XCB_MOD_MASK_ANY,
|
||||
uint8_t button = XCB_BUTTON_INDEX_ANY,
|
||||
|
@ -1848,7 +1848,7 @@ inline void Window::deleteProperty(xcb_atom_t property)
|
|||
xcb_delete_property(connection(), m_window, property);
|
||||
}
|
||||
|
||||
inline void Window::setBorderWidth(uint32_t width)
|
||||
inline void Window::setBorderWidth(int32_t width)
|
||||
{
|
||||
if (!isValid()) {
|
||||
return;
|
||||
|
@ -1927,7 +1927,7 @@ static inline void moveWindow(xcb_window_t window, const QPoint &pos)
|
|||
moveWindow(window, pos.x(), pos.y());
|
||||
}
|
||||
|
||||
static inline void moveWindow(xcb_window_t window, uint32_t x, uint32_t y)
|
||||
static inline void moveWindow(xcb_window_t window, int32_t x, int32_t y)
|
||||
{
|
||||
const uint16_t mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y;
|
||||
const uint32_t values[] = {Xcb::toXNative(x), Xcb::toXNative(y)};
|
||||
|
|
|
@ -3086,8 +3086,8 @@ void Workspace::fixPositionAfterCrash(xcb_window_t w, const xcb_get_geometry_rep
|
|||
|
||||
if (frame.left != 0 || frame.top != 0) {
|
||||
// left and top needed due to narrowing conversations restrictions in C++11
|
||||
const uint32_t left = frame.left;
|
||||
const uint32_t top = frame.top;
|
||||
const int32_t left = frame.left;
|
||||
const int32_t top = frame.top;
|
||||
const uint32_t values[] = {Xcb::toXNative(geometry->x - left), Xcb::toXNative(geometry->y - top)};
|
||||
xcb_configure_window(kwinApp()->x11Connection(), w, XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y, values);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue