| 337 | |
| 338 | |
| 339 | class FocusHandler(object): |
| 340 | def __init__(self, cef_widget): |
| 341 | self.cef_widget = cef_widget |
| 342 | |
| 343 | def OnTakeFocus(self, **_): |
| 344 | if cef.GetAppSetting("debug"): |
| 345 | print("[qt.py] FocusHandler.OnTakeFocus") |
| 346 | |
| 347 | def OnSetFocus(self, **_): |
| 348 | if cef.GetAppSetting("debug"): |
| 349 | print("[qt.py] FocusHandler.OnSetFocus") |
| 350 | |
| 351 | def OnGotFocus(self, browser, **_): |
| 352 | if cef.GetAppSetting("debug"): |
| 353 | print("[qt.py] FocusHandler.OnGotFocus") |
| 354 | self.cef_widget.setFocus() |
| 355 | # Temporary fix no. 1 for focus issues on Linux (Issue #284) |
| 356 | if LINUX: |
| 357 | browser.SetFocus(True) |
| 358 | |
| 359 | |
| 360 | class NavigationBar(QFrame): |