Closed owensys closed 1 year ago
I use pip3 install xlib, then try again, get another error.
ModuleNotFoundError: No module named 'fcntl'
*holo-layer*
buffer
requestActivate() called for QWidgetWindow(0x2a8cf9d9e30, name="HoloWindowClassWindow") which has Qt::WindowDoesNotAcceptFocus set.
Unhandled exception in listener callback
Traceback (most recent call last):
File "d:\Installed\python3.11\Lib\site-packages\pynput\_util\__init__.py", line 228, in inner
return f(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\Installed\python3.11\Lib\site-packages\pynput\keyboard\_win32.py", line 290, in _process
self.on_release(key)
File "d:\Installed\python3.11\Lib\site-packages\pynput\_util\__init__.py", line 144, in inner
if f(*args) is False:
^^^^^^^^
File "d:\emacs_env\home\.emacs.d\packages\holo-layer\holo_layer.py", line 145, in key_release
if self.get_active_window_id() == self.get_emacs_id():
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\emacs_env\home\.emacs.d\packages\holo-layer\holo_layer.py", line 171, in get_active_window_id
self.disp = Display()
^^^^^^^^^
File "d:\Installed\python3.11\Lib\site-packages\Xlib\display.py", line 89, in __init__
self.display = _BaseDisplay(display)
^^^^^^^^^^^^^^^^^^^^^
File "d:\Installed\python3.11\Lib\site-packages\Xlib\display.py", line 71, in __init__
protocol_display.Display.__init__(self, *args, **keys)
File "d:\Installed\python3.11\Lib\site-packages\Xlib\protocol\display.py", line 85, in __init__
name, protocol, host, displayno, screenno = connect.get_display(display)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\Installed\python3.11\Lib\site-packages\Xlib\support\connect.py", line 72, in get_display
mod = _relative_import(modname)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\Installed\python3.11\Lib\site-packages\Xlib\support\connect.py", line 55, in _relative_import
return importlib.import_module('..' + modname, __name__)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\Installed\python3.11\Lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "d:\Installed\python3.11\Lib\site-packages\Xlib\support\unix_connect.py", line 31, in <module>
import fcntl
ModuleNotFoundError: No module named 'fcntl'
Exception in thread Thread-2 (listen_key_event):
Traceback (most recent call last):
File "d:\Installed\python3.11\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "d:\Installed\python3.11\Lib\threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "d:\emacs_env\home\.emacs.d\packages\holo-layer\holo_layer.py", line 139, in listen_key_event
listener.join()
File "d:\Installed\python3.11\Lib\site-packages\pynput\_util\__init__.py", line 276, in join
six.reraise(exc_type, exc_value, exc_traceback)
File "d:\Installed\python3.11\Lib\site-packages\six.py", line 718, in reraise
raise value.with_traceback(tb)
File "d:\Installed\python3.11\Lib\site-packages\pynput\_util\__init__.py", line 228, in inner
return f(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\Installed\python3.11\Lib\site-packages\pynput\keyboard\_win32.py", line 290, in _process
self.on_release(key)
File "d:\Installed\python3.11\Lib\site-packages\pynput\_util\__init__.py", line 144, in inner
if f(*args) is False:
^^^^^^^^
File "d:\emacs_env\home\.emacs.d\packages\holo-layer\holo_layer.py", line 145, in key_release
if self.get_active_window_id() == self.get_emacs_id():
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\emacs_env\home\.emacs.d\packages\holo-layer\holo_layer.py", line 171, in get_active_window_id
self.disp = Display()
^^^^^^^^^
File "d:\Installed\python3.11\Lib\site-packages\Xlib\display.py", line 89, in __init__
self.display = _BaseDisplay(display)
^^^^^^^^^^^^^^^^^^^^^
File "d:\Installed\python3.11\Lib\site-packages\Xlib\display.py", line 71, in __init__
protocol_display.Display.__init__(self, *args, **keys)
File "d:\Installed\python3.11\Lib\site-packages\Xlib\protocol\display.py", line 85, in __init__
name, protocol, host, displayno, screenno = connect.get_display(display)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\Installed\python3.11\Lib\site-packages\Xlib\support\connect.py", line 72, in get_display
mod = _relative_import(modname)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\Installed\python3.11\Lib\site-packages\Xlib\support\connect.py", line 55, in _relative_import
return importlib.import_module('..' + modname, __name__)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\Installed\python3.11\Lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "d:\Installed\python3.11\Lib\site-packages\Xlib\support\unix_connect.py", line 31, in <module>
import fcntl
ModuleNotFoundError: No module named 'fcntl'
requestActivate() called for QWidgetWindow(0x2a8cf9d9e30, name="HoloWindowClassWindow") which has Qt::WindowDoesNotAcceptFocus set.
requestActivate() called for QWidgetWindow(0x2a8cf9d9e30, name="HoloWindowClassWindow") which has Qt::WindowDoesNotAcceptFocus set.
requestActivate() called for QWidgetWindow(0x2a8cf9d9e30, name="HoloWindowClassWindow") which has Qt::WindowDoesNotAcceptFocus set.
I haven't windows, I have push a commit https://github.com/manateelazycat/holo-layer/commit/705b32fca43e15dd3aa1dfee96d698971400ddaf
Can you help to test it ? Thanks.
update local repo, try again.
*holo-layer*
buffer output
Exception in thread Thread-2 (listen_key_event):
Traceback (most recent call last):
File "d:\Installed\python3.11\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "d:\Installed\python3.11\Lib\threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "d:\emacs_env\home\.emacs.d\packages\holo-layer\holo_layer.py", line 140, in listen_key_event
listener.join()
File "d:\Installed\python3.11\Lib\site-packages\pynput\_util\__init__.py", line 276, in join
six.reraise(exc_type, exc_value, exc_traceback)
File "d:\Installed\python3.11\Lib\site-packages\six.py", line 718, in reraise
raise value.with_traceback(tb)
File "d:\Installed\python3.11\Lib\site-packages\pynput\_util\__init__.py", line 228, in inner
return f(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\Installed\python3.11\Lib\site-packages\pynput\keyboard\_win32.py", line 290, in _process
self.on_release(key)
File "d:\Installed\python3.11\Lib\site-packages\pynput\_util\__init__.py", line 144, in inner
if f(*args) is False:
^^^^^^^^
File "d:\emacs_env\home\.emacs.d\packages\holo-layer\holo_layer.py", line 146, in key_release
if self.get_active_window_id() == self.get_emacs_id():
^^^^^^^^^^^^^^^^^^^
File "d:\emacs_env\home\.emacs.d\packages\holo-layer\holo_layer.py", line 158, in get_emacs_id
windows = gw.getWindowsWithTitle(self.emacs_name)
^^
NameError: name 'gw' is not defined
then i install pygetwindow
pip3 install pygetwindow
try again(restart emacs), and error is same again, then i move import pygetwindow to beginning of file holo_layer.py
,
try again(restart emacs), then *holo-layer*
buffer output:
requestActivate() called for QWidgetWindow(0x19cbfc53280, name="HoloWindowClassWindow") which has Qt::WindowDoesNotAcceptFocus set.
requestActivate() called for QWidgetWindow(0x19cbfc53280, name="HoloWindowClassWindow") which has Qt::WindowDoesNotAcceptFocus set.
then i set holo-layer-enable-cursor-animation
enable, it works.
but the cursor animation position not correct, it is always on the right side.
See this gif
I have fixed import error.
Can you make emacs fullscreen and test again?
Works fine when fullscreen.
xlib module has fixed, I have create new issue https://github.com/manateelazycat/holo-layer/issues/22 to track holo-layer can't works with non-fullscreen mode.
windows10, emacs28.1, python3.11
emacs -q
*holo-layer*
buffer