Inital image load after window realization
This commit is contained in:
@@ -193,7 +193,7 @@ proc quit(action: SimpleAction; parameter: Variant; app: Application) =
|
|||||||
## Application quit event
|
## Application quit event
|
||||||
cleanUp(window, app)
|
cleanUp(window, app)
|
||||||
|
|
||||||
proc realizeWindow(window: ApplicationWindow): void =
|
proc realizeWindow(window: ApplicationWindow, image: Image): void =
|
||||||
## Hides the mouse pointer for the application.
|
## Hides the mouse pointer for the application.
|
||||||
if args.fullscreen:
|
if args.fullscreen:
|
||||||
window.fullscreen
|
window.fullscreen
|
||||||
@@ -201,6 +201,10 @@ proc realizeWindow(window: ApplicationWindow): void =
|
|||||||
let win = window.getWindow()
|
let win = window.getWindow()
|
||||||
win.setCursor(cur)
|
win.setCursor(cur)
|
||||||
|
|
||||||
|
# Setting the inital image
|
||||||
|
# Fix 1 second timeout to make sure all other initialization has finished
|
||||||
|
updateTimeout = int(timeoutAdd(1000, timedUpdate, image))
|
||||||
|
|
||||||
proc appActivate(app: Application) =
|
proc appActivate(app: Application) =
|
||||||
# Parse arguments from the command line
|
# Parse arguments from the command line
|
||||||
let parsed = newArgs()
|
let parsed = newArgs()
|
||||||
@@ -269,16 +273,12 @@ proc appActivate(app: Application) =
|
|||||||
window.actionMap.addAction(action)
|
window.actionMap.addAction(action)
|
||||||
|
|
||||||
window.connect("destroy", cleanUp, app)
|
window.connect("destroy", cleanUp, app)
|
||||||
window.connect("realize", realizeWindow)
|
window.connect("realize", realizeWindow, image)
|
||||||
|
|
||||||
window.showAll
|
window.showAll
|
||||||
# Help is only shown on demand
|
# Help is only shown on demand
|
||||||
helpBox.hide
|
helpBox.hide
|
||||||
|
|
||||||
# Setting the inital image
|
|
||||||
# Fix 1 second timeout to make sure all other initialization has finished
|
|
||||||
updateTimeout = int(timeoutAdd(1000, timedUpdate, image))
|
|
||||||
|
|
||||||
## open communication channel from the control server
|
## open communication channel from the control server
|
||||||
chan.open()
|
chan.open()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user