SecurityCentral / classification-banner

Displays Classification Banner for a Graphical Session
Other
4 stars 7 forks source link

Multi monitor support #13

Closed dhyams closed 11 months ago

dhyams commented 11 months ago

It looks like self.num_monitors is always set to zero, which means that the option to span across monitors is not meaningful; it always spans monitors no matter what. Is there another way to do multi monitor support, where the banner appears separately in each monitor, with the classification level centered at the top of each monitor?

bracketttc commented 11 months ago

It should be possible. The existing multi-monitor code seems broken though. Gdk.Monitor.get_geometry() returns a Gdk.Rectangle which isn't iterable or decomposable into a tuple. I think it's fairly trivially fixable, but it makes me wonder why the code started using xrandr as the preferred source of screen/monitor size over GTK - there might be something I'm missing.

redhatrises commented 11 months ago

Previously, gtk didn't reliably provide the correct number of monitors in older versions depending on display and graphic card implementation. Granted this issue is several years old and maybe fixed, so happy to merge and revisit if it is still an issue with improper display settings reported back.

bracketttc commented 11 months ago

With some work, we can get that information from xrandr, but the current processing of the xrandr output doesn't do that - it only gets the screen size (with the version ofxrandr that I have installed that's the only invocation that parses as expected).