/srv/irclogs.ubuntu.com/2022/10/14/#mir-server.txt

SaviqGood friday o/07:23
Saviqalan_g hey, so unless I'm missing something, it's not about fullscreen or not - in BasicWindowManager we only ever respect the window-requested `output_id`, not that from `modifications`07:51
alan_g[m]Where are you looking?07:53
SaviqReally, anywhere in `BasicWindowManager`; `::display_area_for` only takes the `WindowInfo`, not the `WindowSpecification`07:57
SaviqOnly `::update_attached_and_fullscreen_sets` takes `modification.output_id` into account07:58
SaviqAnd `::place_and_size_for_state`, but only to decide whether to even look at anything else07:59
SaviqI could, of course, override `top_left` in `FrameWindowManager`, but it probably makes more sense to actually respect the modifications one?08:06
alan_g[m]Yeah, the only place I see using it is `place_new_surface()` - which is called to populate the default `requested_specification` for `WindowManagementPolicy::place_new_window()`. I think we need the same logic in `place_and_size_for_state()`08:23
alan_g[m]...and, like you say, `place_and_size_for_state()` uses `display_area_for(window_info)`, without considering the `modifications.output_id()`.08:35
alan_g[m]Hmm, even more "interesting" `case mir_window_state_fullscreen:` calls `display_area_for` instead of using the existing `display_area`.08:48
-GitHub[m]:#mir-server- **[MirServer/mir]** AlanGriffiths opened [pull request #2700](https://github.com/MirServer/mir/pull/2700): [miral] Respect the output id supplied when modifying a window08:55
-GitHub[m]:#mir-server- **[MirServer/mir]** AlanGriffiths requested a review from Saviq for [pull request #2700](https://github.com/MirServer/mir/pull/2700): [miral] Respect the output id supplied when modifying a window09:36
SaviqWhile that looks better, it doesn't help in Frame, 'cause we're spoofing the state to be maximized… Should `::confirm_placement_on_display` take `modifications.output_id` into account as well, or does maximized with `output_id` not make sense?10:24
SaviqWe're doing the spoofing to respect exclusive zones (i.e. OSK). Which is, in itself, a disuptable thing to do, but we have no other mechanism to inform app of occluded areas atm.10:29
alan_g[m]You're right about the spoofing. It will only work because `place_new_surface()` does respect the output_id and that is called for an initial placement10:36
alan_g[m]So, we could spoof with something like:... (full message at <https://libera.ems.host/_matrix/media/r0/download/libera.chat/f1302894bb148d8f9680b42bc51c8839f8bdf7f6>)10:38
SaviqAh. funky. Will try10:39
alan_g[m]NB I'm not suggesting this is "good"10:40
SaviqI know, but not much worse than what we do currently. It's at least inconsistent that we respect `WindowInfo::output_id`, but not `WindowSpecification::output_id` when maximized10:41
SaviqWhich nudges me we should make a call (or respect the protocol, if that's defined there), and stick to it.10:42
alan_g[m]I think the problem is that we trying to use the default placement logic to override the default placement logic10:45
SaviqThat, too :)10:45
SaviqBut even despite that, IMO we need to be consistent on respecting, or not, `::output_id` when *maximized10:45
alan_g[m]Just having Frame use its own place_and_size_for_state would be better10:45
SaviqThat basically was https://github.com/MirServer/ubuntu-frame/pull/2910:46
alan_g[m]Well, which protocol do you want to respect? wl-shell and xdg-shell only specify an output for fullscreen requests.10:46
alan_g[m]Wheras mir-shell...10:47
alan_g[m]Our window management API can what we choose10:47
alan_g[m]E.g. if a modify request specifies an output, then we can choose to respect it regardless of the window state. But xdg-shell clients won't specifiy it unless it's a fullscreen request. But do we remember the output on new requests, or reset it?10:52
SaviqYeah, I suppose maximized with output_id is not something we explicitly enabled, that it works is more of an accident, but that's something that I think we should fix one way or the other.11:07
alan_g[m]Well, it doesn't work - which is why we spoof it in Frame11:16
alan_g[m]So, the miral API isn't exposing the right primitives. What we have is "place_and_size_for_state", what we want is "place_and_size_with_options", and the options are derived from the state11:29
Saviq> Well, it doesn't work12:05
SaviqIIUC maximized with output_id _does_ work, that's what we (ab)use in Frame to have things fullscreened, but respect the exclusive zones of the OSK…12:05
alan_g[m]I think what currently happens is we fullscreen with output_id (which places it on the output) and then maximise to respect the application_zone of that output.12:56
alan_g[m]Oh, I misunderstood. You mean it uses the output_id already associated with the window_info12:59
alan_g[m]Yeah, it is all a bit inconsistent13:03
SaviqLooks like that did it, thanks!13:33
alan_g[m]One of these cycles miral needs reworking! This didn't break any of the `WindowPlacement*` tests.14:13
-GitHub[m]:#mir-server- **[MirServer/mir]** Saviq assigned to [pull request #2700](https://github.com/MirServer/mir/pull/2700): [miral] Respect the output id supplied when modifying a window15:08
alan_g[m]Have a good weekend! 0/16:59
SaviqSame \o17:00
-GitHub[m]:#mir-server- **[MirServer/mir]** bors[bot] merged [pull request #2700](https://github.com/MirServer/mir/pull/2700): [miral] Respect the output id supplied when modifying a window17:30

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!