Closed Clutchnp closed 1 month ago
Can not really test it right now, but I'd put the maximizing into a separate function, as it seems long enough with a purpose of maximizing.
you mean making a separate function for linux maximizing like this ?
else:
def linux_maximize():
ds, root = x_maximize()
window_id = pygame.display.get_wm_info()['window']
wm_state = ds.intern_atom('_NET_WM_STATE')
max_horz = ds.intern_atom('_NET_WM_STATE_MAXIMIZED_HORZ')
max_vert = ds.intern_atom('_NET_WM_STATE_MAXIMIZED_VERT')
data = [1, max_horz, max_vert,0,0]
e = event.ClientMessage(
window=window_id,
client_type=wm_state,
format=32,
data=(32, data)
)
root.send_event(e, event_mask=X.SubstructureRedirectMask | X.SubstructureNotifyMask)
ds.flush()
linux_maximize()
Yes, that's what I meant, putting it into retro_screen.py would be also quite reasonable in my opinion.
done
Thanks, will get to testing it around the weekend.
Alright seem to work fine, also we should hide the maximize button, when minimize is not supported but lets leave that for another pr. As always thanks for contributing.
_NET_WM_STATE is more popularly implemented than _NET_WM_WORK_AREA