Window management: Difference between revisions

Added "window_process_all_updates" after hiding to actually hide the window. Changed "get_width" to "get_position".
m (→‎version 2: added/changed comments and whitespace.)
(Added "window_process_all_updates" after hiding to actually hide the window. Changed "get_width" to "get_position".)
Line 887:
proc thisHide(widget: PWidget; data: Pgpointer) {.cdecl.} =
widget.get_parent_window().hide()
window_process_all_updates()
sleep(2000)
widget.get_parent_window().show()
Line 896 ⟶ 897:
 
proc thisMove(widget: PWidget; data: Pgpointer) {.cdecl.} =
var wx, hy: gint
widget.get_parent_window().get_sizeget_position(addr(wx), addr(hy))
if isshifted:
widget.get_parent_window().move(wx - 10, hy - 10)
else:
widget.get_parent_window().move(wx + 10, hy + 10)
isShifted = not isShifted
 
Anonymous user