Skip to content

QuickEditor: Use XCB API to position the editor window

Vlad Zahorodnii requested to merge work/x11-placement into release/20.08

Qt scales coordinates relative to the upper-left corner of the screen where the quick editor window is. This means that (0, 0) in the logical pixels is not the same as (0, 0) in the native pixels.

Commit ccf8d522 tried to address that issue by mapping (0, 0) from the native pixels to the logical pixels.

Unfortunately, it doesn't work reliably because setting geometry may move a window to another screen and thus the computed window position will be wrong.

It would be wonderful if QXcbWindowFunctions had a function that sets the window geometry in native pixels that we could use here in Spectacle to bypass HiDPI code path.

As a short term solution, this change makes Spectacle use XCB API directly to position itself.

Edited by Vlad Zahorodnii

Merge request reports

Loading