diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-06-17 16:06:02 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2019-06-19 00:49:57 +0200 |
commit | 3b06ad51d91ff2b9442f159cddf34ed03bc2dd35 (patch) | |
tree | 538f4261cdb9b79bd19537b4ed478439d1b9fb16 /nx-X11/programs/Xserver | |
parent | 0f8dbbab2a218269165f06de37db59b5a20f09ea (diff) | |
download | nx-libs-3b06ad51d91ff2b9442f159cddf34ed03bc2dd35.tar.gz nx-libs-3b06ad51d91ff2b9442f159cddf34ed03bc2dd35.tar.bz2 nx-libs-3b06ad51d91ff2b9442f159cddf34ed03bc2dd35.zip |
Screen.c: Fix: make sure RRCloseScreen is being called
Fixes ArcticaProject/nx-libs#598
In nxagentOpenScreen we first initialized the RRExtension for the
screen and then replaced pScreen->CloseScreen by
nxagentCloseScreen. This resulted in RandR's RRCloseScreen (and any
other CloseScreen procedure installed by extensions) being no longer
called.
Moving RandR init after configuring pScreen->CloseScreen ensures the
correct calling cascade:
RRCloseScreen -> nxagentCloseScreen ->fbCloseScreen (called explicitly
by nxagentCloseScreen).
Which in turn will fix this memory leak:
==9688== 328 (312 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record 271 of 319
==9688== at 0x4837B65: calloc (vg_replace_malloc.c:752)
==9688== by 0x4ED2C6: RRScreenInit (randr.c:329)
==9688== by 0x1F2B18: nxagentInitRandRExtension (Extensions.c:122)
==9688== by 0x1DEAFF: nxagentOpenScreen (Screen.c:1409)
==9688== by 0x16D7F8: AddScreen (dispatch.c:4257)
==9688== by 0x1DA0CF: InitOutput (Init.c:397)
==9688== by 0x14DCC2: main (main.c:280)
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Screen.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 7d180da44..84ef9c4a4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1402,13 +1402,6 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, pScreen -> rootDepth = rootDepth; /* - * Complete the initialization of the RANDR - * extension. - */ - - nxagentInitRandRExtension(pScreen); - - /* * Set up the internal structures used for * tracking the proxy resources associated * to the unpack and split operations. @@ -1694,6 +1687,13 @@ N/A nxagentOption(Height)) / 32) } + /* + * Complete the initialization of the RANDR + * extension. + */ + + nxagentInitRandRExtension(pScreen); + #ifdef TEST nxagentPrintAgentGeometry(NULL, "nxagentOpenScreen:"); #endif |