Remove redundant setFocus call, which actually removes focus.

Under i3wm 4.21.1/Qt 6.4.1, the existing code actually removes keyboard focus
from the newly-activated window. Removing the call to setFocus in these cases
fixes the problem. The call to activateWindow is enough to put keyboard focus on
it.

The documentation for activateWindow implies the same.
This commit is contained in:
Fritz Mahnke 2023-04-17 08:06:24 -07:00
parent 771bccd820
commit 46ad7bbd38
9 changed files with 0 additions and 11 deletions

View File

@ -54,7 +54,6 @@ void openCheatDialog(QWidget *parent)
{
win->activateWindow();
win->raise();
win->setFocus();
return;
}
win = new GuiCheatsDialog_t(parent);

View File

@ -63,7 +63,6 @@ int openCDLWindow( QWidget *parent )
{
cdlWin->activateWindow();
cdlWin->raise();
cdlWin->setFocus();
}
else
{

View File

@ -4548,7 +4548,6 @@ void debuggerWindowSetFocus(bool val)
{
dbgWin->activateWindow();
dbgWin->raise();
dbgWin->setFocus();
}
}
//----------------------------------------------------------------------------

View File

@ -126,7 +126,6 @@ int openFamilyKeyboardDialog(QWidget *parent)
{
fkbWin->activateWindow();
fkbWin->raise();
fkbWin->setFocus();
}
else
{

View File

@ -4222,7 +4222,6 @@ int hexEditorOpenFromDebugger( int mode, int addr )
{
win->activateWindow();
win->raise();
win->setFocus();
}
win->editor->setMode( mode );

View File

@ -108,7 +108,6 @@ int openNameTableViewWindow( QWidget *parent )
{
nameTableViewWindow->activateWindow();
nameTableViewWindow->raise();
nameTableViewWindow->setFocus();
return -1;
}
initNameTableViewer();

View File

@ -116,7 +116,6 @@ void tasWindowSetFocus(bool val)
{
tasWin->activateWindow();
tasWin->raise();
tasWin->setFocus();
}
}
// this getter contains formula to decide whether to record or replay movie
@ -2917,7 +2916,6 @@ void TasEditorWindow::openFindNoteWindow(void)
{
findWin->activateWindow();
findWin->raise();
findWin->setFocus();
}
else
{

View File

@ -1211,7 +1211,6 @@ void openTraceLoggerWindow(QWidget *parent)
{
traceLogWindow->activateWindow();
traceLogWindow->raise();
traceLogWindow->setFocus();
return;
}
//printf("Open Trace Logger Window\n");

View File

@ -92,7 +92,6 @@ int openPPUViewWindow( QWidget *parent )
{
ppuViewWindow->activateWindow();
ppuViewWindow->raise();
ppuViewWindow->setFocus();
return -1;
}
initPPUViewer();
@ -110,7 +109,6 @@ int openOAMViewWindow( QWidget *parent )
{
spriteViewWindow->activateWindow();
spriteViewWindow->raise();
spriteViewWindow->setFocus();
return -1;
}
initPPUViewer();