mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-03-01 01:40:36 -05:00
Set Cage's window title to toplevel's title
When using the Wayland or X11 backend, Cage is drawn inside a window. This commit sets this window's title to that of the currently focused toplevel window inside Cage. Fixes #29.
This commit is contained in:
parent
443d955dfd
commit
c00ac5c462
7 changed files with 53 additions and 1 deletions
10
view.c
10
view.c
|
|
@ -6,8 +6,11 @@
|
|||
* See the LICENSE file accompanying this file.
|
||||
*/
|
||||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wayland-server.h>
|
||||
#include <wlr/types/wlr_box.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
|
|
@ -18,6 +21,13 @@
|
|||
#include "server.h"
|
||||
#include "view.h"
|
||||
|
||||
char *
|
||||
view_get_title(struct cg_view *view)
|
||||
{
|
||||
const char *title = view->get_title(view);
|
||||
return strndup(title, strlen(title));
|
||||
}
|
||||
|
||||
void
|
||||
view_activate(struct cg_view *view, bool activate)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue