aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Screen.c
Commit message (Collapse)AuthorAgeFilesLines
* Screen.c: use XlibWindow so silence the compilerUlrich Sibiller2019-06-271-2/+2
| | | | | | | | | | | | | | This is a bit weird, I'd expect far more places where the compiler could complain about Window vs Window64... But it does not. Screen.c:306:32: warning: passing argument 3 of ‘XQueryTree’ from incompatible pointer type [-Wincompatible-pointer-types] if (XQueryTree(d, candidate, &root, &parent, &children, &num_children)) ^~~~~ In file included from Screen.c:60: Agent.h:85:25: note: expected ‘Window64 *’ {aka ‘long unsigned int *’} but argument is of type ‘Window *’ {aka ‘unsigned int *’} #define Window Window64 ../../../../exports/include/nx-X11/Xlib.h:3041:5: note: in expansion of macro ‘Window’ Window* /* root_return */,
* Consistently use None instead of 0 for nxagentIconWindow everywhereUlrich Sibiller2019-06-271-1/+1
|
* Screen.c: simplify nxagentMinimizeFromFullscreenUlrich Sibiller2019-06-271-6/+9
|
* nxagentMaximizeToFullScreen: only reparent if necessaryUlrich Sibiller2019-06-271-21/+56
| | | | | | | | This fixes problems with kwin and compiz when using the switch-all-screens keystroke. The fullscreen would appear shortly and then vanish again. Fixes ArcticaProject/nx-libs#458
* Screen.c: add nxagentIsParentOf helperUlrich Sibiller2019-06-271-0/+22
|
* Screen.c: fix two more memleaks of visualsUlrich Sibiller2019-06-221-0/+2
|
* Screen.c: fix two memleaksUlrich Sibiller2019-06-221-19/+18
| | | | While at it create and use the freeDepths() helper function.
* various scope improvementsUlrich Sibiller2019-06-191-3/+1
|
* Screen.c: more debug outputUlrich Sibiller2019-06-191-1/+4
|
* Screen.c: fix another memory leakUlrich Sibiller2019-06-191-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ==12280== 0 bytes in 5 blocks are definitely lost in loss record 1 of 304 ==12280== at 0x483577F: malloc (vg_replace_malloc.c:299) ==12280== by 0x2EFC29: init_visuals (xf86glx.c:489) ==12280== by 0x2EFC29: __MESA_initVisuals (xf86glx.c:540) ==12280== by 0x17C902: GlxInitVisuals (glxext.c:317) ==12280== by 0x218C03: fbInitVisuals (fbcmap.c:668) ==12280== by 0x20BC41: fbFinishScreenInit (fbscreen.c:229) ==12280== by 0x20C005: fbScreenInit (fbscreen.c:273) ==12280== by 0x1E024C: nxagentOpenScreen (Screen.c:1356) ==12280== by 0x16D828: AddScreen (dispatch.c:4171) ==12280== by 0x1DB7DF: InitOutput (Init.c:396) ==12280== by 0x14DB12: main (main.c:279) ==12280== ==12280== 64 bytes in 2 blocks are definitely lost in loss record 223 of 304 ==12280== at 0x483577F: malloc (vg_replace_malloc.c:299) ==12280== by 0x2EFA05: init_visuals (xf86glx.c:489) ==12280== by 0x2EFA05: __MESA_initVisuals (xf86glx.c:540) ==12280== by 0x17C902: GlxInitVisuals (glxext.c:317) ==12280== by 0x218C03: fbInitVisuals (fbcmap.c:668) ==12280== by 0x20BC41: fbFinishScreenInit (fbscreen.c:229) ==12280== by 0x20C005: fbScreenInit (fbscreen.c:273) ==12280== by 0x1E024C: nxagentOpenScreen (Screen.c:1356) ==12280== by 0x16D828: AddScreen (dispatch.c:4171) ==12280== by 0x1DB7DF: InitOutput (Init.c:396) ==12280== by 0x14DB12: main (main.c:279)
* Screen.c: Fix: make sure RRCloseScreen is being calledUlrich Sibiller2019-06-191-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Screen.c: correctly free stuff in nxagentCloseScreenUlrich Sibiller2019-06-191-3/+15
| | | | | | | | | | | | | | fixes a memory leak: ==19074== 2 bytes in 1 blocks are definitely lost in loss record 8 of 313 ==19074== at 0x483577F: malloc (vg_replace_malloc.c:299) ==19074== by 0x1FD83D: fbAllocatePrivates (fballpriv.c:79) ==19074== by 0x20A666: fbSetupScreen (fbscreen.c:110) ==19074== by 0x20A666: fbScreenInit (fbscreen.c:300) ==19074== by 0x1DEA4C: nxagentOpenScreen (Screen.c:1356) ==19074== by 0x16D7F8: AddScreen (dispatch.c:4257) ==19074== by 0x1DA0CF: InitOutput (Init.c:397) ==19074== by 0x14DCC2: main (main.c:280)
* Screen.c: more TEST outputUlrich Sibiller2019-06-111-5/+10
|
* Screen.c: use consistent spacing on pointer referencesUlrich Sibiller2019-06-111-4/+4
|
* Screen.c: whitespace/formatting fixesUlrich Sibiller2019-06-111-21/+22
|
* Screen.c: report both created windows (and with the right name)Ulrich Sibiller2019-06-111-4/+9
|
* Window.c: fix: report correct window on icon window creationUlrich Sibiller2019-06-111-2/+2
|
* Revert "nxagent: rework Bool handling"Ulrich Sibiller2019-02-151-26/+26
| | | | | | | | | | | | This reverts commit 16cd2bbe1c4425e3fa557f9ca0723aa94a50b071. It turned out that I had missed some of the Booleans being actually tristate variables. I think I can fix this (they do not need to be tristate) but I revert this for now to get back to a working state (there are reports about non-working fullscreen mode and reconnect problems). Refers to ArcticaProject/nx-libs#772
* nxagent: rework Bool handlingUlrich Sibiller2019-02-111-26/+26
| | | | drop "== False", "== 0", "== True" and "== 0" for nxagentOptions and Traps
* Screen.c: code optimization for rootless modeUlrich Sibiller2019-02-111-4/+6
| | | | | In rootless mode skip processing user geometry stuff since the values will we overwritten later anyway.
* Screen.c: simplify and fix handling of rootless modeUlrich Sibiller2019-02-111-23/+17
| | | | Fixes: ArcticaProject/nx-libs#765
* Screen.c: fix handling of fullscreen startupUlrich Sibiller2019-01-141-5/+5
| | | | | | | | | If nxagent is started in fullscreen mode take care the saved size (that is applied on exit of the fullscreen mode) will be configured correctly. Also respect a user provided -geometry option (had been ignored here previously). Fixes ArcticaProject/nx-libs#449
* Screen.c: fix size calculation in rootless modeUlrich Sibiller2019-01-141-2/+16
| | | | | | | There's no need to reduce the size to 75% in rootless mode. We always want to have the full size then. Fixes ArcticaProject/nx-libs#757 (Part 2/2)
* Screen.c: improve readability of size calculationsUlrich Sibiller2019-01-141-65/+57
| | | | | | ... by using some short named variables and the min() macro. No change in behaviour.
* Screen.c: move identical line out of both parts of an if clauseUlrich Sibiller2019-01-141-3/+2
|
* nxagent: use nxagentWMPassed as Bool all over the placeUlrich Sibiller2018-10-221-1/+1
| | | | has been used as integer sometimes (technically correct, but not nice)
* nxagent: use nxagentWMIsRunning as Bool all over the placeUlrich Sibiller2018-10-221-1/+1
| | | | | | has been used as integer sometimes (technically correct, but not nice) Fixes ArcticaProject/nx-libs#698
* Replace MIN/MAX macros by min/max from misc.hUlrich Sibiller2018-08-231-8/+9
| | | | We do not need two versions in the code
* Fix broken 9a7c0b081fad98bfcfcceff9557781f4b39ec572Ulrich Sibiller2018-08-221-13/+20
| | | | | | | | | Windowsize was wrong when run with nxagent :<someDisplay>. Basically three changes: - reference sizeHints and wmHints correctly (no &) - do not use uninitialized wmHints - set wmHints Xutf8SetWMProperties() call instead of separate call
* refactor nxagentGet(Default)EventMaskUlrich Sibiller2018-08-221-11/+6
| | | | Fixes ArcticaProject/nx-libs#691.
* nxagent: Used 'Xutf8SetVMPropertis' instead of 'XSetStandardProperties' + ↵Pavel Vaynerman2018-08-221-13/+6
| | | | 'Xutf8SetWMProperties'
* fix window title encoding (use utf8) for nxagentPavel Vaynerman2018-08-221-2/+8
|
* whitespace fixesUlrich Sibiller2018-05-241-2/+2
|
* Screen.c: simplify setting of window name/classUlrich Sibiller2018-05-241-16/+11
|
* nxagent: remove mmwidth/mmheight from nxagentChangeScreenConfigUlrich Sibiller2018-05-241-4/+4
| | | | Was 0,0 on every call...
* Screen.c/Events.c: fix some commentsUlrich Sibiller2018-05-241-1/+1
|
* nxagent: use XAllocSizeHints() instead of XSizeHints structUlrich Sibiller2018-05-241-72/+116
| | | | | | This is the preferred way. It ensures, that a) the data is zeroed b) a correct size in case xlib is changing the size of the structure in future releases
* Screen.c/Events.c: add some FIXMEsUlrich Sibiller2018-05-241-0/+3
|
* Screen.c: replace XSetWMNormalHints code block by already existing functionUlrich Sibiller2018-05-241-36/+5
| | | | nxagentSetWMNormalHints was slightly adapted therefore
* hw/nxagent: fix spelling errors as reported by codespellUlrich Sibiller2018-05-241-3/+3
|
* nx-X11/programs/Xserver/hw/nxagent/Screen.c: do not try to set a NULL mode ↵Mihai Moldovan2018-03-151-5/+5
| | | | | | if the output was disconnected before. Fixes: ArcticaProject/nx-libs#677
* nx-X11/programs/Xserver/hw/nxagent/Screen.c: initialize pointers to NULL to ↵Mihai Moldovan2018-03-151-1/+1
| | | | avoid referencing random data.
* Xserver/hw/nxagent/Screen.c: Drop commented out code. Functionality now ↵Mike Gabriel2018-03-071-16/+0
| | | | implemented in intersect_bb() function.
* hw/nxagent/Screen.c: Cover Xinerama bounding box corner cases.Mike Gabriel2018-03-071-16/+81
| | | | | | | | | | | | | | | | | If the agent window is moved around on screen, it can happen that it is moved into an invisible area of the real Xserver, we calls this "beyond the bounding box". . If the agent window is partially beyond the bounding box, we don't want Xinerama to re-adjust the RandR parameters inside the agent. Near the bounding box, the session shall stay intact. . This means, desktop env wise, the desktop session control elements can be moved (with the agent window) into the invisible areas of the real Xserver and moved out again without RandR events arriving inside the agent session. Fixes ArcticaProject/nx-libs#662.
* hw/nxagent/Screen.c: Settle down with 96 DPI as the default resolution, if ↵Simon Matter2018-03-011-1/+1
| | | | | | nothing better can be detected. Fixes ArcticaProject/nx-libs#668.
* nxagent: Auto-detect client-side DPI at session startup.Simon Matter2018-02-271-3/+39
|
* hw/nxagent/: Use <function>(void) rather than <function>().Mike Gabriel2018-02-261-2/+2
|
* Screen.c: Fix wrong function names in TEST outputUlrich Sibiller2018-02-051-1/+1
|
* hw/nxagent/Screen.c: Additionally check for noRRXineramaExtension set to ↵Mike Gabriel2018-01-161-1/+1
| | | | | | FALSE before using the nxagentAdjustRandRXinerama() function and providing a Xinerama-like user experience. Fixes ArcticaProject/nx-libs#634.
* Screen.c: string handling improvementsUlrich Sibiller2018-01-071-16/+10
|