79579827

Date: 2025-04-17 18:04:05
Score: 0.5
Natty:
Report link

OK, found kind of solution: so according to the (mentioned above) clue found a while ago WM may indeed override these values — and there's a need to mess with that window further using xcb_configure_window function. In this particular case the following should be added right before /* Free the Generic Event */ comment line:

uint32_t vals[5];
  vals[0] = (screen->width_in_pixels / 2) - (600 / 2);
  vals[1] = (screen->height_in_pixels / 2) - (400 / 2);
  vals[2] = 600;
  vals[3] = 400;
  vals[4] = 20; 

xcb_configure_window(c, win, XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y |
  XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT |
  XCB_CONFIG_WINDOW_BORDER_WIDTH, vals);
xcb_flush(c);

I noted that the above still somehow did not allow me to change „border width” of the window (anyone knows why?) — while its size and position have been changed accordingly.

Reasons:
  • Blacklisted phrase (0.5): why?
  • Blacklisted phrase (1): anyone knows
  • Whitelisted phrase (-2): solution:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Empty Stack