steamcompmgr: add focus debug optional spew

This commit is contained in:
Pierre-Loup A. Griffais 2020-07-28 19:12:17 -07:00
parent d7132a2397
commit a24b3ba008
2 changed files with 14 additions and 2 deletions

View file

@ -58,7 +58,7 @@ int main(int argc, char **argv)
bool bSleepAtStartup = false; bool bSleepAtStartup = false;
while ((o = getopt (argc, argv, ":R:T:w:h:W:H:r:NSvVecsdlnb")) != -1) while ((o = getopt (argc, argv, ":R:T:w:h:W:H:r:NFSvVecsdlnb")) != -1)
{ {
switch (o) { switch (o) {
case 'w': case 'w':

View file

@ -222,6 +222,7 @@ unsigned int lastSampledFrameTime;
float currentFrameRate; float currentFrameRate;
static Bool doRender = True; static Bool doRender = True;
static Bool debugFocus = False;
static Bool drawDebugInfo = False; static Bool drawDebugInfo = False;
static Bool debugEvents = False; static Bool debugEvents = False;
static Bool steamMode = False; static Bool steamMode = False;
@ -1329,6 +1330,14 @@ determine_and_apply_focus (Display *dpy, MouseCursor *cursor)
} }
gpuvis_trace_printf( "determine_and_apply_focus focus %lu\n", focus->id ); gpuvis_trace_printf( "determine_and_apply_focus focus %lu\n", focus->id );
if ( debugFocus == True )
{
fprintf( stderr, "determine_and_apply_focus focus %lu\n", focus->id );
char buf[512];
sprintf( buf, "xwininfo -id 0x%lx; xprop -id 0x%lx; xwininfo -root -tree", focus->id, focus->id );
system( buf );
}
} }
currentFocusWindow = focus->id; currentFocusWindow = focus->id;
@ -2124,7 +2133,7 @@ steamcompmgr_main (int argc, char **argv)
// :/ // :/
optind = 1; optind = 1;
while ((o = getopt (argc, argv, ":R:T:w:h:W:H:r:NSvVecsdlnb")) != -1) while ((o = getopt (argc, argv, ":R:T:w:h:W:H:r:NFSvVecsdlnb")) != -1)
{ {
switch (o) { switch (o) {
case 'R': case 'R':
@ -2140,6 +2149,9 @@ steamcompmgr_main (int argc, char **argv)
case 'N': case 'N':
doRender = False; doRender = False;
break; break;
case 'F':
debugFocus = True;
break;
case 'S': case 'S':
synchronize = True; synchronize = True;
break; break;