Mercurial > octave
diff libgui/src/octave-dock-widget.h @ 27281:0915fec3d3a9
prevent gui from catching focus when its desktop workspace becomes active
* file-editor.cc (focus): renamed into activate and make use of
octave_dock_widget::activate;
(set_focus): use qt setFocus instead of own old octave_dock_widget::focus;
(request_new_file, request_close_file, active_tab_changed,
handle_visibility, request_open_file):
call new method activate instead of old focus;
* file-editor.h: removed method focus and added new method activate
* main-window.cc (focus_command_window): activate instead of focus;
(editor_tabs_changed, construct_documentation_menu):
use activate slot instead of focus;
* octave-dock-widget.cc (make_window, make_widget, set_focus_predecessor):
use qt setFocus instead of removed focus method;
(activate): implementation of renamed method;
(handle_visibility): moved implementation from header to here
* octave-dock-widget.h: renamed focus into activate, moved implementation
from here to cc-file, use setFocus in handle_visibility,
moved implementation for handle_visibility from here to cc-file
* terminal-dock-widget.cc (focus): removed virtual implementation
* terminal-dock-widget.h: removed focus method
author | Torsten Lilge <ttl-octave@mailbox.org> |
---|---|
date | Mon, 22 Jul 2019 22:20:56 +0200 |
parents | 420611c61298 |
children | 5f170ea12fa1 |
line wrap: on
line diff
--- a/libgui/src/octave-dock-widget.h Mon Jul 22 20:05:55 2019 +0200 +++ b/libgui/src/octave-dock-widget.h Mon Jul 22 22:20:56 2019 +0200 @@ -108,21 +108,9 @@ public slots: - virtual void focus (void) - { - if (! isVisible ()) - setVisible (true); + virtual void activate (void); - setFocus (); - activateWindow (); - raise (); - } - - virtual void handle_visibility (bool visible) - { - if (visible && ! isFloating ()) - focus (); - } + virtual void handle_visibility (bool visible); virtual void notice_settings (const QSettings*) { }