1
0
Fork 0

Compare commits

..

No commits in common. "da721d13f499016642f2a1a86694c98fd052ba7e" and "ddb1e7b804f2c32a98714190f1637cec1fa6606f" have entirely different histories.

1 changed files with 5 additions and 15 deletions

View File

@ -31,26 +31,16 @@ class TestWin(Gtk.Window):
self.screen = self.get_screen() self.screen = self.get_screen()
self.visual = self.screen.get_rgba_visual() self.visual = self.screen.get_rgba_visual()
if self.visual is None or not self.screen.is_composited(): if self.visual is None or not self.screen.is_composited():
print( print("ERROR: You do not appear to be running a composite manager")
"WARNING: You do not appear to be running a composite manager" sys.exit(1)
", transparency not available"
)
else: else:
self.set_visual(self.visual) self.set_visual(self.visual)
def make_fullscreen(self): def make_fullscreen(self):
geo = self.get_screen_size(self._default_monitor) geo = self.get_screen_size(self._default_monitor)
scale = (1.05, 6) self.move(geo.x, geo.y)
x, y, w, h = ( self.resize(geo.width, geo.height)
geo.x + geo.width / 2 - geo.width / scale[0] / 2,
geo.y,
geo.width / scale[0],
geo.height / scale[1],
)
self.move(x, y)
self.resize(w, h)
print(f"geometry: @{x:.0f},{y:.0f} {w:.0f}x{h:.0f}")
def get_screen_size(self, monitor): def get_screen_size(self, monitor):
return self.get_screen().get_monitor_geometry(monitor) return self.get_screen().get_monitor_geometry(monitor)