Xlib - Two issues with call to XMoveResizeWindow

时间:2019-06-01 14:09:03

标签: c x11 xlib

I am new to Xlib (in C) and am having two issues when calling the XMoveResizeWindow function.

ex. XMoveResizeWindow(display, window_id, move_x, move_y, resize_x, resize_y);

1) After the call, the window I move will reposition itself correctly, however, if I select the window with the pointer after the move, it will instantly revert back to the position it held prior to the move. I assume I have to somehow 'update' the X11 server after it's moved with the windows new position?

2) Secondly, in regards to the resize of the window. My window is essentially being truncated by the x and y values entered, instead of resized. In other words, instead of the entire window shrinking down, the right and bottom sides of the window are cut off from view. Is there a way to instead resize the entire window?

--I am sorry I am unable to submit my complete code, however, I believe my issues are due solely to my lack of understanding of Xlib and this particular function's operations. As such, I am not neccessarily looking for specific code as a solution, merely an explination or suggestion on how I should go about implementing a solution.

Thank you.

1 个答案:

答案 0 :(得分:0)

我认为您的代码有问题,因为该代码不可用,我将指出 an example

示例在自述文件中给出。