mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-10 04:27:57 -05:00
opt: optimize get client from surface
This commit is contained in:
parent
01e957f2ae
commit
2aa7e58d7c
2 changed files with 4 additions and 15 deletions
|
|
@ -13,7 +13,10 @@ static void handle_controller_set_hint(struct wl_listener *listener,
|
|||
void *data) {
|
||||
struct tearing_controller *controller =
|
||||
wl_container_of(listener, controller, set_hint);
|
||||
Client *c = get_client_from_surface(controller->tearing_control->surface);
|
||||
Client *c = NULL;
|
||||
|
||||
toplevel_from_wlr_surface(controller->tearing_control->surface, &c, NULL);
|
||||
|
||||
if (c) {
|
||||
/*
|
||||
* tearing_control->current is actually an enum:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue