-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
X11: backend::create_screenshots
creates blank screenshots
#91
Comments
Function did screenshot the whole virtual screen and set them as individual screenshots of the screens. Partially fixed in #88 but screenshots still blank. |
Problem exists on KDE and Gnome only. We will use a workaround via FreeDesktopPortal Screenshot capability. See this python code for a reference implementation import sys
import json
from PyQt5.QtCore import QObject, pyqtSlot
from PyQt5.QtWidgets import QApplication
from PyQt5.QtDBus import QDBusConnection, QDBusInterface, QDBusMessage
class DbusTest(QObject):
def __init__(self):
super(DbusTest, self).__init__()
bus = QDBusConnection.sessionBus()
bus.registerObject('/', self)
interface = QDBusInterface(
"org.freedesktop.portal.Desktop",
"/org/freedesktop/portal/desktop",
"org.freedesktop.portal.Screenshot",
)
reply = interface.call("Screenshot", "", {"interactive": False, "handle_token": "demo_app"})
path = (reply.arguments()[0])
print(path)
bus.connect(
'org.freedesktop.portal.Desktop',
path,
'org.freedesktop.portal.Request',
'Response',
self.testMessage
)
print('Connected')
@pyqtSlot(QDBusMessage)
def testMessage(self, msg):
print(json.dumps(msg.arguments()[1]))
print(msg.arguments()[1]['uri'])
if __name__ == '__main__':
app = QApplication(sys.argv)
discoverer = DbusTest()
sys.exit(app.exec_())
tation:
`` |
|
Waiting for... iovxw/ksni#23 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
System also has Hyprland installed.
Steps to reproduce:
xorg
,xorg-server
andxorg-xinit
Related to #88 crop selection bug: canvas not getting cleaned properly because of the screenshots being transparent.
Other screenshot tools are able to do screenshots seamlessly.
The text was updated successfully, but these errors were encountered: