windowPreview: Subclass a C actor
Move the get_preferred_width/height() and allocate() vfunc implementations of WindowPreview to C, subclassing the C GObject from JS. This gets us another significant performance gain, allocating a workspace with 20 windows now only takes 1.2 ms. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1743>
This commit is contained in:
14
src/shell-window-preview.h
Normal file
14
src/shell-window-preview.h
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef __SHELL_WINDOW_PREVIEW_H__
|
||||
#define __SHELL_WINDOW_PREVIEW_H__
|
||||
|
||||
#include <st/st.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define SHELL_TYPE_WINDOW_PREVIEW (shell_window_preview_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (ShellWindowPreview, shell_window_preview,
|
||||
SHELL, WINDOW_PREVIEW, StWidget)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __SHELL_WINDOW_PREVIEW_H__ */
|
Reference in New Issue
Block a user