Comments (28)
oh, it's because I have maximized window.
it happens on resize.
from cuda_exterminal.
self.memo.focus() # handy, but can be annoying to some
it was added to make terminal focused after MANUAL resizing of bottom panel.
and on Windows and Linux-gtk it was playing fine with maximized window on app startup.
but qt5 version calling on_resize event even on initial maximized state on startup.
I guess I will just disable this code for now.
thanks again!
from cuda_exterminal.
- Need to think
- Hotkey only for top menu item? I understand it - handling of top menu hotkeys is built in in Lazarus. If you want to ignore some hotkey , try to handle it in on_key_down
from cuda_exterminal.
trying to repeat the 1) but Cud always starts with Console active - even if I activate 'ExTerminal 1' , after restart Cud don't show ExTerminal! do you see it?
from cuda_exterminal.
trying to repeat the 1) but Cud always starts with Console active - even if I activate 'ExTerminal 1' , after restart Cud don't show ExTerminal! do you see it?
no. "ui_bottom_on_start" option is not set to default?
from cuda_exterminal.
It was '0' which is default! after removing line in user.json - all works again. will see it.
from cuda_exterminal.
found the reason - bug was visible IF session didn't have ui-tabs... fixed.
from cuda_exterminal.
on Cud startup focus goes to Editor on Windows (not to opened ExTerminal), but on Linux it goes to ExTerminal (which is bad).
cannot see it here!
focus goes to editor. linux gtk2 version.
try on clean Cud with only ExTerminal, pls.
from cuda_exterminal.
gtk2: OK
qt5: BAD
I tend to always use qt5 version of CudaText.
don't know why. maybe because qt5 is not as old as gtk2? (2011 vs 2020)
from cuda_exterminal.
qt5 has good Laz maintainer. if we find bug there, its better.
looking.
from cuda_exterminal.
looked. qt5 version - also all OK here. I cannot see initially focused terminal.
from cuda_exterminal.
some steps on clean Cud with ExTerm?
from cuda_exterminal.
let's create Cud issue?
from cuda_exterminal.
let's create Cud issue?
I'm starting to think it's a ExTerminal bug. (I have on_resize
event)
Although it is interesting how gtk and qt behaves differently when maximized at startup.
but when I resize window it behaves similarly on both gtk and qt.
from cuda_exterminal.
how gtk and qt behaves differently
usual situation.
from cuda_exterminal.
let's talk about second issue:
- Hotkey only for top menu item? I understand it - handling of top menu hotkeys is built in in Lazarus. If you want to ignore some hotkey , try to handle it in on_key_down
consider this situation on Linux:
- set hotkey in Cud so
F10
key will openOptions Editor Lite
- focus ExTerminal, press
F10
- OEL will show up. even though I have
return False
inform_key_down
:
elif key == keys.VK_F10:
self.write(ctrl.ESC+'[21~')
return False
from wiki: If plugin returns False, key is blocked.
on Linux it is not blocked whether you return True or False or None.
on Windows it is always blocked.
maybe this happens for bottom panels only?
from cuda_exterminal.
not for bottom panels only- for all controls on a form. happens when 'hotkey' is set in the MainMenu (top menu bar). so - key goes to MainMenu handler before our 'on_key_down' . sad!
from cuda_exterminal.
so can I help more?
from cuda_exterminal.
can be some bug in lazarus (difference between win/qt/gtk versions).
it would be good to check if we can make some workaround in pascal code to make uniform behaviour for all systems/backends.
from cuda_exterminal.
quickly looked at app. cannot find the reason why 'memo' is focused. will try to create pascal demo for me.
from cuda_exterminal.
i'm talking about hotkey issue. focus issue can be fixed in plugin, i think.
from cuda_exterminal.
Hotkey handling by MainMenu is heavy issue, seems not solvable by me (and we have macOS)
from cuda_exterminal.
About focusing issue. made some digging.
I placed 'breakpoint' in IDE on EditorFocus() in unit proc_editor.
qt5 version.
- if app not maximized, its called only 1 time on start - for the main editor tab. Called from
FormShow()
as 'stack trace' shows. - if app maximized (in prev session), its called 2nd time - from some Py code! because 'stack trace' window shows its called from
api_ed_focus()
.
To find from WHAT Py code it was called (2nd time) i need to make some printing of stack-trace of Py code in cudatext.py in def focus()
. Can you try it pls? or I will do
from cuda_exterminal.
I don't know how to use this..
https://docs.python.org/3/library/traceback.html
from cuda_exterminal.
ok, digged this more. added to cudatext.py to def focus
:
def focus(self):
print(traceback.print_stack())
return ct.ed_focus(self.h)
this shows that ExTerm is culprit!
Python 3.8.10
Init: cuda_exterminal
Init: cudatext
Startup: 450ms, plugins: 40ms (exterminal 43ms)
File "/home/user/.config/cudatext/py/cudatext.py", line 1172, in _timer_proc_callback_proxy
return _live[info](tag)
File "/home/user/.config/cudatext/py/cuda_exterminal/terminal.py", line 432, in terminal_resize
self.screen.resize(self.visible_lines,self.visible_columns-3)
File "/home/user/.config/cudatext/py/cuda_exterminal/memoscreen.py", line 74, in resize
self.memo.focus() # handy, but can be annoying to some
File "/home/user/.config/cudatext/py/cudatext.py", line 1348, in focus
print(traceback.print_stack())
None
from cuda_exterminal.
thank you for investigation!
from cuda_exterminal.
resizing of bottom panel is triggered even on manual resizing of the whole window. (obviously)
so this code is bad anyway.
from cuda_exterminal.
yes
from cuda_exterminal.
Related Issues (20)
- Maybe add option show_caption=1 to save vert space ? HOT 2
- Maybe add option max_log_lines=3000 to speed up colored painting? HOT 1
- macOS testing HOT 3
- cannot copy contents of the memo HOT 6
- Lexer: PAX_Pascal HOT 5
- I got a email with patches to translate the plugin HOT 1
- How to change the background and hide the dots? HOT 7
- How to increase font size? HOT 3
- Background of the icon HOT 17
- context menu item 'Close terminal' HOT 2
- Clean the entire terminal HOT 7
- Patches to better support i18n HOT 1
- terminal shows 'margin' line like main editor HOT 2
- Strange behavior HOT 3
- option for floating terminal HOT 2
- Constant 5% CPU usage under Windows HOT 1
- Command history? HOT 12
- better config() method HOT 1
- [Not An Issue][Advice Needed] PseudoConsole Escape Codes HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cuda_exterminal.