mirror of
https://github.com/labwc/labwc.git
synced 2026-04-04 07:15:41 -04:00
tree-wide: rename g_server to just server
This commit is contained in:
parent
8d46da9db1
commit
4f72e6775e
61 changed files with 955 additions and 955 deletions
|
|
@ -31,7 +31,7 @@ static void
|
|||
focus_surface(struct session_lock_manager *manager, struct wlr_surface *focused)
|
||||
{
|
||||
manager->focused = focused;
|
||||
seat_focus_lock_surface(&g_server.seat, focused);
|
||||
seat_focus_lock_surface(&server.seat, focused);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -78,7 +78,7 @@ handle_surface_map(struct wl_listener *listener, void *data)
|
|||
* buffer has not been actually attached to the surface.
|
||||
*/
|
||||
wl_event_loop_add_idle(
|
||||
g_server.wl_event_loop, update_focus, output);
|
||||
server.wl_event_loop, update_focus, output);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -98,7 +98,7 @@ static void
|
|||
lock_output_reconfigure(struct session_lock_output *output)
|
||||
{
|
||||
struct wlr_box box;
|
||||
wlr_output_layout_get_box(g_server.output_layout,
|
||||
wlr_output_layout_get_box(server.output_layout,
|
||||
output->output->wlr_output, &box);
|
||||
wlr_scene_rect_set_size(output->background, box.width, box.height);
|
||||
if (output->surface) {
|
||||
|
|
@ -191,7 +191,7 @@ static void
|
|||
align_session_lock_tree(struct output *output)
|
||||
{
|
||||
struct wlr_box box;
|
||||
wlr_output_layout_get_box(g_server.output_layout,
|
||||
wlr_output_layout_get_box(server.output_layout,
|
||||
output->wlr_output, &box);
|
||||
wlr_scene_node_set_position(&output->session_lock_tree->node, box.x, box.y);
|
||||
}
|
||||
|
|
@ -228,7 +228,7 @@ session_lock_output_create(struct session_lock_manager *manager, struct output *
|
|||
* already locked, blank immediately.
|
||||
*/
|
||||
lock_output->blank_timer =
|
||||
wl_event_loop_add_timer(g_server.wl_event_loop,
|
||||
wl_event_loop_add_timer(server.wl_event_loop,
|
||||
handle_output_blank_timeout, lock_output);
|
||||
if (!manager->locked) {
|
||||
wlr_scene_node_set_enabled(&background->node, false);
|
||||
|
|
@ -323,11 +323,11 @@ handle_new_session_lock(struct wl_listener *listener, void *data)
|
|||
assert(wl_list_empty(&manager->lock_outputs));
|
||||
|
||||
/* Remember the focused view to restore it on unlock */
|
||||
manager->last_active_view = g_server.active_view;
|
||||
seat_focus_surface(&g_server.seat, NULL);
|
||||
manager->last_active_view = server.active_view;
|
||||
seat_focus_surface(&server.seat, NULL);
|
||||
|
||||
struct output *output;
|
||||
wl_list_for_each(output, &g_server.outputs, link) {
|
||||
wl_list_for_each(output, &server.outputs, link) {
|
||||
session_lock_output_create(manager, output);
|
||||
}
|
||||
|
||||
|
|
@ -353,7 +353,7 @@ handle_manager_destroy(struct wl_listener *listener, void *data)
|
|||
session_lock_destroy(manager);
|
||||
wl_list_remove(&manager->new_lock.link);
|
||||
wl_list_remove(&manager->destroy.link);
|
||||
g_server.session_lock_manager = NULL;
|
||||
server.session_lock_manager = NULL;
|
||||
free(manager);
|
||||
}
|
||||
|
||||
|
|
@ -361,8 +361,8 @@ void
|
|||
session_lock_init(void)
|
||||
{
|
||||
struct session_lock_manager *manager = znew(*manager);
|
||||
g_server.session_lock_manager = manager;
|
||||
manager->wlr_manager = wlr_session_lock_manager_v1_create(g_server.wl_display);
|
||||
server.session_lock_manager = manager;
|
||||
manager->wlr_manager = wlr_session_lock_manager_v1_create(server.wl_display);
|
||||
wl_list_init(&manager->lock_outputs);
|
||||
|
||||
manager->new_lock.notify = handle_new_session_lock;
|
||||
|
|
@ -375,16 +375,16 @@ session_lock_init(void)
|
|||
void
|
||||
session_lock_update_for_layout_change(void)
|
||||
{
|
||||
if (!g_server.session_lock_manager->locked) {
|
||||
if (!server.session_lock_manager->locked) {
|
||||
return;
|
||||
}
|
||||
|
||||
struct output *output;
|
||||
wl_list_for_each(output, &g_server.outputs, link) {
|
||||
wl_list_for_each(output, &server.outputs, link) {
|
||||
align_session_lock_tree(output);
|
||||
}
|
||||
|
||||
struct session_lock_manager *manager = g_server.session_lock_manager;
|
||||
struct session_lock_manager *manager = server.session_lock_manager;
|
||||
struct session_lock_output *lock_output;
|
||||
wl_list_for_each(lock_output, &manager->lock_outputs, link) {
|
||||
lock_output_reconfigure(lock_output);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue