consoled-display.c revision ce7b9f50c3fadbad22feeb28e4429ad9bee02bcc
d657c51f14601d0235434ffb78cf6ac0f27cc83cLennart Poettering/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
a11c7ea52cc31a8c95e46e781469d3a104f48090Lennart Poettering This file is part of systemd.
a11c7ea52cc31a8c95e46e781469d3a104f48090Lennart Poettering Copyright 2014 David Herrmann <dh.herrmann@gmail.com>
a11c7ea52cc31a8c95e46e781469d3a104f48090Lennart Poettering systemd is free software; you can redistribute it and/or modify it
a11c7ea52cc31a8c95e46e781469d3a104f48090Lennart Poettering under the terms of the GNU Lesser General Public License as published by
a11c7ea52cc31a8c95e46e781469d3a104f48090Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
a11c7ea52cc31a8c95e46e781469d3a104f48090Lennart Poettering (at your option) any later version.
a11c7ea52cc31a8c95e46e781469d3a104f48090Lennart Poettering systemd is distributed in the hope that it will be useful, but
a11c7ea52cc31a8c95e46e781469d3a104f48090Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
28c85daf0ae80d1d5f8b878efa4bdad690e1f29bLennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28c85daf0ae80d1d5f8b878efa4bdad690e1f29bLennart Poettering Lesser General Public License for more details.
a11c7ea52cc31a8c95e46e781469d3a104f48090Lennart Poettering You should have received a copy of the GNU Lesser General Public License
f1f8a5a5e110f485257e8702ad30b9997e529a74Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
a11c7ea52cc31a8c95e46e781469d3a104f48090Lennart Poetteringint display_new(Display **out, Session *s, grdev_display *display) {
28c85daf0ae80d1d5f8b878efa4bdad690e1f29bLennart Poettering _cleanup_(display_freep) Display *d = NULL;
f1f8a5a5e110f485257e8702ad30b9997e529a74Lennart Poettering d->width = grdev_display_get_width(display);
f1f8a5a5e110f485257e8702ad30b9997e529a74Lennart Poettering d->height = grdev_display_get_height(display);
f1f8a5a5e110f485257e8702ad30b9997e529a74Lennart Poettering LIST_PREPEND(displays_by_session, d->session->display_list, d);
28c85daf0ae80d1d5f8b878efa4bdad690e1f29bLennart Poettering LIST_REMOVE(displays_by_session, d->session->display_list, d);
f1f8a5a5e110f485257e8702ad30b9997e529a74Lennart Poettering d->width = grdev_display_get_width(d->grdev);
f1f8a5a5e110f485257e8702ad30b9997e529a74Lennart Poettering d->height = grdev_display_get_height(d->grdev);
f1f8a5a5e110f485257e8702ad30b9997e529a74Lennart Poetteringvoid display_render(Display *d, Workspace *w) {
f1f8a5a5e110f485257e8702ad30b9997e529a74Lennart Poettering GRDEV_DISPLAY_FOREACH_TARGET(d->grdev, target) {