Enhancement: Fixes #184, Replace xfdesktop with our own desktop implementation

This commit is contained in:
Rory Fewell
2023-07-24 20:00:04 +01:00
parent cdb952e3cc
commit 51d837fb3c
32 changed files with 813 additions and 231 deletions

View File

@@ -6,6 +6,7 @@ sounds
themes/native
themes/professional
themes/luna/blue
shell/desktop
shell/run
shell/taskband
shell/winver

View File

@@ -0,0 +1,92 @@
cmake_minimum_required(VERSION 3.0)
project(
libwintc-shelldpa
VERSION 1.0
DESCRIPTION "Windows Total Conversion shell display protocol abstraction library."
LANGUAGES C
)
set(PROJECT_ANYARCH false)
set(PROJECT_FREESTATUS true)
set(PROJECT_MAINTAINER "Rory Fewell <roryf@oddmatics.uk>")
set(PROJECT_ROOT ${CMAKE_CURRENT_LIST_DIR})
set(WINTC_NO_PEDANTIC_COMPILE true) # Necessary because we use dlsym()
include(GNUInstallDirs)
include(../../packaging/cmake-inc/common/CMakeLists.txt)
include(../../packaging/cmake-inc/libraries/CMakeLists.txt)
include(../../packaging/cmake-inc/linking/CMakeLists.txt)
include(../../packaging/cmake-inc/packaging/CMakeLists.txt)
wintc_resolve_library(gdk-pixbuf-2.0 GDK_PIXBUF)
wintc_resolve_library(glib-2.0 GLIB)
wintc_resolve_library(gtk+-3.0 GTK3)
wintc_resolve_library(wintc-comgtk WINTC_COMGTK)
add_library(
libwintc-shelldpa
src/api.c
src/api.h
src/impl-wayland.c
src/impl-wayland.h
src/impl-wndmgmt-wnck.c
src/impl-wndmgmt-wnck.h
src/impl-wndmgmt-xfw.c
src/impl-wndmgmt-xfw.h
src/impl-x11.c
src/impl-x11.h
)
set_target_properties(
libwintc-shelldpa
PROPERTIES
PUBLIC_HEADER public/wintc-shelldpa.h
SOVERSION 1
VERSION ${PROJECT_VERSION}
)
target_compile_options(
libwintc-shelldpa
PRIVATE ${WINTC_COMPILE_OPTIONS}
)
target_include_directories(
libwintc-shelldpa
SYSTEM
PRIVATE ${GDK_PIXBUF_INCLUDE_DIRS}
PRIVATE ${GLIB_INCLUDE_DIRS}
PRIVATE ${GTK3_INCLUDE_DIRS}
PRIVATE ${WINTC_COMGTK_INCLUDE_DIRS}
)
target_link_directories(
libwintc-shelldpa
PRIVATE ${GDK_PIXBUF_LIBRARY_DIRS}
PRIVATE ${GLIB_LIBRARY_DIRS}
PRIVATE ${GTK3_LIBRARY_DIRS}
PRIVATE ${WINTC_COMGTK_LIBRARY_DIRS}
)
target_link_libraries(
libwintc-shelldpa
PRIVATE ${CMAKE_DL_LIBS}
PRIVATE ${GDK_PIXBUF_LIBRARIES}
PRIVATE ${GLIB_LIBRARIES}
PRIVATE ${GTK3_LIBRARIES}
PRIVATE ${WINTC_COMGTK_LIBRARIES}
)
# Installation
#
wintc_configure_and_install_packaging()
wintc_add_pkgconfig_install()
install(
TARGETS libwintc-shelldpa
LIBRARY DESTINATION ${LIB_DIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

4
shared/shelldpa/deps Normal file
View File

@@ -0,0 +1,4 @@
bt,rt:gdk-pixbuf2
bt,rt:glib2
bt,rt:gtk3
bt,rt:wintc-comgtk

View File

@@ -0,0 +1,54 @@
#ifndef __WINTC_SHELLDPA_H__
#define __WINTC_SHELLDPA_H__
//
// PUBLIC DEFINES
//
#define WinTCWndMgmtScreen void
#define WinTCWndMgmtWindow void
//
// PUBLIC ENUMS
//
typedef enum
{
WINTC_DISPPROTO_X11,
WINTC_DISPPROTO_WAYLAND
} WinTCDisplayProtocol;
//
// PUBLIC FUNCTIONS
//
WinTCDisplayProtocol wintc_get_display_protocol_in_use(void);
gboolean wintc_init_display_protocol_apis(void);
extern void (*wintc_anchor_taskband_to_bottom) (
GtkWindow* taskband
);
extern void (*wintc_become_desktop_window) (
GtkWindow* window
);
extern WinTCWndMgmtWindow* (*wintc_wndmgmt_screen_get_active_window) (
WinTCWndMgmtScreen* screen
);
extern WinTCWndMgmtScreen* (*wintc_wndmgmt_screen_get_default) (void);
extern GdkPixbuf* (*wintc_wndmgmt_window_get_mini_icon) (
WinTCWndMgmtWindow* window
);
extern gchar* (*wintc_wndmgmt_window_get_name) (
WinTCWndMgmtWindow* window
);
extern gboolean (*wintc_wndmgmt_window_is_skip_tasklist) (
WinTCWndMgmtWindow* window
);
extern void (*wintc_wndmgmt_window_minimize) (
WinTCWndMgmtWindow* window
);
extern void (*wintc_wndmgmt_window_unminimize) (
WinTCWndMgmtWindow* window
);
#endif

View File

@@ -3,57 +3,61 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <glib.h>
#include "dispproto.h"
#include "dispproto-wayland.h"
#include "dispproto-x11.h"
#include "dispproto-wndmgmt-wnck.h"
#include "dispproto-wndmgmt-xfw.h"
#include "api.h"
#include "impl-wayland.h"
#include "impl-x11.h"
#include "impl-wndmgmt-wnck.h"
#include "impl-wndmgmt-xfw.h"
//
// STATIC DATA
//
static TaskbandDisplayProtocol s_dispproto;
static WinTCDisplayProtocol s_dispproto;
//
// RESOLVED FUNCS
//
static GType (*p_gdk_x11_display_get_type) (void) = NULL;
static GType (*p_gdk_x11_display_get_type) (void) = NULL;
static GType (*p_gdk_wayland_display_get_type) (void) = NULL;
void (*anchor_taskband_to_bottom)(
void (*wintc_anchor_taskband_to_bottom) (
GtkWindow* taskband
) = NULL;
WndMgmtWindow* (*wndmgmt_screen_get_active_window) (
WndMgmtScreen* screen
void (*wintc_become_desktop_window) (
GtkWindow* window
) = NULL;
WndMgmtScreen* (*wndmgmt_screen_get_default) (void) = NULL;
GdkPixbuf* (*wndmgmt_window_get_mini_icon) (
WndMgmtWindow* window
WinTCWndMgmtWindow* (*wintc_wndmgmt_screen_get_active_window) (
WinTCWndMgmtScreen* screen
) = NULL;
gchar* (*wndmgmt_window_get_name) (
WndMgmtWindow* window
WinTCWndMgmtScreen* (*wintc_wndmgmt_screen_get_default) (void) = NULL;
GdkPixbuf* (*wintc_wndmgmt_window_get_mini_icon) (
WinTCWndMgmtWindow* window
) = NULL;
gboolean (*wndmgmt_window_is_skip_tasklist) (
WndMgmtWindow* window
gchar* (*wintc_wndmgmt_window_get_name) (
WinTCWndMgmtWindow* window
) = NULL;
void (*wndmgmt_window_minimize) (
WndMgmtWindow* window
gboolean (*wintc_wndmgmt_window_is_skip_tasklist) (
WinTCWndMgmtWindow* window
) = NULL;
void (*wndmgmt_window_unminimize) (
WndMgmtWindow* window
void (*wintc_wndmgmt_window_minimize) (
WinTCWndMgmtWindow* window
) = NULL;
void (*wintc_wndmgmt_window_unminimize) (
WinTCWndMgmtWindow* window
) = NULL;
//
// PUBLIC FUNCTIONS
//
TaskbandDisplayProtocol get_display_protocol_in_use(void)
WinTCDisplayProtocol wintc_get_display_protocol_in_use(void)
{
return s_dispproto;
}
gboolean init_display_protocol_apis(void)
gboolean wintc_init_display_protocol_apis(void)
{
void* dl_gdk = dlopen("libgdk-3.so", RTLD_LAZY | RTLD_LOCAL);
@@ -86,7 +90,7 @@ gboolean init_display_protocol_apis(void)
(G_TYPE_CHECK_INSTANCE_TYPE((display), p_gdk_x11_display_get_type()))
)
{
s_dispproto = DISPPROTO_X11;
s_dispproto = WINTC_DISPPROTO_X11;
if (!init_x11_protocol_impl())
{
@@ -99,7 +103,7 @@ gboolean init_display_protocol_apis(void)
(G_TYPE_CHECK_INSTANCE_TYPE((display), p_gdk_wayland_display_get_type()))
)
{
s_dispproto = DISPPROTO_WAYLAND;
s_dispproto = WINTC_DISPPROTO_WAYLAND;
if (!init_wayland_protocol_impl())
{
@@ -115,11 +119,11 @@ gboolean init_display_protocol_apis(void)
// Window management stuff, we prioritise loading xfce4windowing because it
// is the future - failing that we try WNCK, but only for X cos It Don't
// Work On Wayland! (TM)
// Work On Wayland
//
if (!init_wndmgmt_xfw_impl())
{
if (get_display_protocol_in_use() == DISPPROTO_WAYLAND)
if (wintc_get_display_protocol_in_use() == WINTC_DISPPROTO_WAYLAND)
{
// It's over for Wayland!
//
@@ -132,7 +136,7 @@ gboolean init_display_protocol_apis(void)
if (!init_wndmgmt_wnck_impl())
{
// No WNCK! Computer over! Disaster = very yes!
// No WNCK! Computer over! Disaster = very yes!
//
g_critical(
"%s",

58
shared/shelldpa/src/api.h Normal file
View File

@@ -0,0 +1,58 @@
#ifndef __API_H__
#define __API_H__
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <glib.h>
#include <gtk/gtk.h>
//
// PUBLIC DEFINES
//
#define WinTCWndMgmtScreen void
#define WinTCWndMgmtWindow void
//
// PUBLIC ENUMS
//
typedef enum
{
WINTC_DISPPROTO_X11,
WINTC_DISPPROTO_WAYLAND
} WinTCDisplayProtocol;
//
// PUBLIC FUNCTIONS
//
WinTCDisplayProtocol wintc_get_display_protocol_in_use(void);
gboolean wintc_init_display_protocol_apis(void);
extern void (*wintc_anchor_taskband_to_bottom) (
GtkWindow* taskband
);
extern void (*wintc_become_desktop_window) (
GtkWindow* window
);
extern WinTCWndMgmtWindow* (*wintc_wndmgmt_screen_get_active_window) (
WinTCWndMgmtScreen* screen
);
extern WinTCWndMgmtScreen* (*wintc_wndmgmt_screen_get_default) (void);
extern GdkPixbuf* (*wintc_wndmgmt_window_get_mini_icon) (
WinTCWndMgmtWindow* window
);
extern gchar* (*wintc_wndmgmt_window_get_name) (
WinTCWndMgmtWindow* window
);
extern gboolean (*wintc_wndmgmt_window_is_skip_tasklist) (
WinTCWndMgmtWindow* window
);
extern void (*wintc_wndmgmt_window_minimize) (
WinTCWndMgmtWindow* window
);
extern void (*wintc_wndmgmt_window_unminimize) (
WinTCWndMgmtWindow* window
);
#endif

View File

@@ -3,8 +3,8 @@
#include <glib.h>
#include <gtk/gtk.h>
#include "dispproto.h"
#include "dispproto-wayland.h"
#include "api.h"
#include "impl-wayland.h"
//
// PRIVATE ENUMS
@@ -45,6 +45,15 @@ void (*p_gtk_layer_set_layer) (
GtkWindow* window,
GtkLayerShellLayer layer
);
void (*p_gtk_layer_set_margin) (
GtkWindow* window,
GtkLayerShellEdge edge,
int margin_size
);
void (*p_gtk_layer_set_namespace) (
GtkWindow* window,
const char* name_space
);
//
// FORWARD DECLARATIONS
@@ -52,6 +61,9 @@ void (*p_gtk_layer_set_layer) (
static void wayland_anchor_taskband_to_bottom(
GtkWindow* taskband
);
static void wayland_become_desktop_window(
GtkWindow* window
);
//
// PUBLIC FUNCTIONS
@@ -67,7 +79,7 @@ gboolean init_wayland_protocol_impl(void)
return FALSE;
}
// Resolve funcs we're using
// Resolve the funcs we're using
//
p_gtk_layer_auto_exclusive_zone_enable =
dlsym(dl_gtk_layer_shell, "gtk_layer_auto_exclusive_zone_enable");
@@ -77,12 +89,18 @@ gboolean init_wayland_protocol_impl(void)
dlsym(dl_gtk_layer_shell, "gtk_layer_set_anchor");
p_gtk_layer_set_layer =
dlsym(dl_gtk_layer_shell, "gtk_layer_set_layer");
p_gtk_layer_set_margin =
dlsym(dl_gtk_layer_shell, "gtk_layer_set_margin");
p_gtk_layer_set_namespace =
dlsym(dl_gtk_layer_shell, "gtk_layer_set_namespace");
if (
p_gtk_layer_auto_exclusive_zone_enable == NULL ||
p_gtk_layer_init_for_window == NULL ||
p_gtk_layer_set_anchor == NULL ||
p_gtk_layer_set_layer == NULL
p_gtk_layer_set_layer == NULL ||
p_gtk_layer_set_margin == NULL ||
p_gtk_layer_set_namespace == NULL
)
{
g_critical("%s", "Failed to resolve symbols for GTK layer shell.");
@@ -91,7 +109,8 @@ gboolean init_wayland_protocol_impl(void)
// All good, assign the API now
//
anchor_taskband_to_bottom = &wayland_anchor_taskband_to_bottom;
wintc_anchor_taskband_to_bottom = &wayland_anchor_taskband_to_bottom;
wintc_become_desktop_window = &wayland_become_desktop_window;
return TRUE;
}
@@ -114,3 +133,16 @@ static void wayland_anchor_taskband_to_bottom(
p_gtk_layer_set_anchor(taskband, i, anchors[i]);
}
}
static void wayland_become_desktop_window(
GtkWindow* window
)
{
p_gtk_layer_init_for_window(window);
p_gtk_layer_set_layer(window, GTK_LAYER_SHELL_LAYER_BACKGROUND);
p_gtk_layer_set_anchor(window, GTK_LAYER_SHELL_EDGE_TOP, TRUE);
p_gtk_layer_set_anchor(window, GTK_LAYER_SHELL_EDGE_LEFT, TRUE);
p_gtk_layer_set_margin(window, GTK_LAYER_SHELL_EDGE_TOP, 0);
p_gtk_layer_set_margin(window, GTK_LAYER_SHELL_EDGE_LEFT, 0);
p_gtk_layer_set_namespace(window, "desktop");
}

View File

@@ -1,5 +1,5 @@
#ifndef __DISPPROTO_WAYLAND_H__
#define __DISPPROTO_WAYLAND_H__
#ifndef __IMPL_WAYLAND_H__
#define __IMPL_WAYLAND_H__
#include <glib.h>

View File

@@ -2,39 +2,39 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <glib.h>
#include "dispproto.h"
#include "dispproto-wndmgmt-wnck.h"
#include "api.h"
#include "impl-wndmgmt-wnck.h"
//
// RESOLVED FUNCS
//
static WndMgmtWindow* (*p_wnck_screen_get_active_window) (
WndMgmtScreen* screen
static WinTCWndMgmtWindow* (*p_wnck_screen_get_active_window) (
WinTCWndMgmtScreen* screen
) = NULL;
static WndMgmtScreen* (*p_wnck_screen_get_default) (void) = NULL;
static WinTCWndMgmtScreen* (*p_wnck_screen_get_default) (void) = NULL;
static GdkPixbuf* (*p_wnck_window_get_mini_icon) (
WndMgmtWindow* window
WinTCWndMgmtWindow* window
) = NULL;
static gchar* (*p_wnck_window_get_name) (
WndMgmtWindow* window
WinTCWndMgmtWindow* window
) = NULL;
static gboolean (*p_wnck_window_is_skip_tasklist) (
WndMgmtWindow* window
WinTCWndMgmtWindow* window
) = NULL;
static void (*p_wnck_window_minimize) (
WndMgmtWindow* window
WinTCWndMgmtWindow* window
) = NULL;
static void (*p_wnck_window_unminimize) (
WndMgmtWindow* window,
guint32 timestamp
WinTCWndMgmtWindow* window,
guint32 timestamp
) = NULL;
//
// FORWARD DECLARATIONS
//
static void wnck_window_unminimize_now(
WndMgmtWindow* window
WinTCWndMgmtWindow* window
);
//
@@ -91,13 +91,13 @@ gboolean init_wndmgmt_wnck_impl(void)
// We're good, implement the API
//
wndmgmt_screen_get_active_window = p_wnck_screen_get_active_window;
wndmgmt_screen_get_default = p_wnck_screen_get_default;
wndmgmt_window_get_mini_icon = p_wnck_window_get_mini_icon;
wndmgmt_window_get_name = p_wnck_window_get_name;
wndmgmt_window_is_skip_tasklist = p_wnck_window_is_skip_tasklist;
wndmgmt_window_minimize = p_wnck_window_minimize;
wndmgmt_window_unminimize = &wnck_window_unminimize_now;
wintc_wndmgmt_screen_get_active_window = p_wnck_screen_get_active_window;
wintc_wndmgmt_screen_get_default = p_wnck_screen_get_default;
wintc_wndmgmt_window_get_mini_icon = p_wnck_window_get_mini_icon;
wintc_wndmgmt_window_get_name = p_wnck_window_get_name;
wintc_wndmgmt_window_is_skip_tasklist = p_wnck_window_is_skip_tasklist;
wintc_wndmgmt_window_minimize = p_wnck_window_minimize;
wintc_wndmgmt_window_unminimize = &wnck_window_unminimize_now;
return TRUE;
}
@@ -106,7 +106,7 @@ gboolean init_wndmgmt_wnck_impl(void)
// PRIVATE FUNCTIONS
//
static void wnck_window_unminimize_now(
WndMgmtWindow* window
WinTCWndMgmtWindow* window
)
{
// FIXME: This throws a warning because we use 0 or GDK_CURRENT_TIME where

View File

@@ -1,5 +1,5 @@
#ifndef __DISPPROTO_WNDMGMT_WNCK_H__
#define __DISPPROTO_WNDMGMT_WNCK_H__
#ifndef __IMPL_WNDMGMT_WNCK_H__
#define __IMPL_WNDMGMT_WNCK_H__
#include <glib.h>

View File

@@ -2,45 +2,45 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <glib.h>
#include "dispproto.h"
#include "dispproto-wndmgmt-xfw.h"
#include "api.h"
#include "impl-wndmgmt-xfw.h"
//
// RESOLVED FUNCS
//
static WndMgmtWindow* (*p_xfw_screen_get_active_window) (
WndMgmtScreen* screen
static WinTCWndMgmtWindow* (*p_xfw_screen_get_active_window) (
WinTCWndMgmtScreen* screen
) = NULL;
static WndMgmtScreen* (*p_xfw_screen_get_default) (void) = NULL;
static WinTCWndMgmtScreen* (*p_xfw_screen_get_default) (void) = NULL;
static GdkPixbuf* (*p_xfw_window_get_icon) (
WndMgmtWindow* window,
gint size,
gint scale
WinTCWndMgmtWindow* window,
gint size,
gint scale
) = NULL;
static gchar* (*p_xfw_window_get_name) (
WndMgmtWindow* window
WinTCWndMgmtWindow* window
) = NULL;
static gboolean (*p_xfw_window_is_skip_tasklist) (
WndMgmtWindow* window
WinTCWndMgmtWindow* window
) = NULL;
static gboolean (*p_xfw_window_set_minimized) (
WndMgmtWindow* window,
gboolean is_maximized,
GError** error
WinTCWndMgmtWindow* window,
gboolean is_maximized,
GError** error
) = NULL;
//
// FORWARD DECLARATIONS
//
static GdkPixbuf* xfw_window_get_mini_icon(
WndMgmtWindow* window
WinTCWndMgmtWindow* window
);
static void xfw_window_minimize(
WndMgmtWindow* window
WinTCWndMgmtWindow* window
);
static void xfw_window_unminimize(
WndMgmtWindow* window
WinTCWndMgmtWindow* window
);
//
@@ -93,13 +93,13 @@ gboolean init_wndmgmt_xfw_impl(void)
// We're good, implement the API
//
wndmgmt_screen_get_active_window = p_xfw_screen_get_active_window;
wndmgmt_screen_get_default = p_xfw_screen_get_default;
wndmgmt_window_get_mini_icon = &xfw_window_get_mini_icon;
wndmgmt_window_get_name = p_xfw_window_get_name;
wndmgmt_window_is_skip_tasklist = p_xfw_window_is_skip_tasklist;
wndmgmt_window_minimize = &xfw_window_minimize;
wndmgmt_window_unminimize = &xfw_window_unminimize;
wintc_wndmgmt_screen_get_active_window = p_xfw_screen_get_active_window;
wintc_wndmgmt_screen_get_default = p_xfw_screen_get_default;
wintc_wndmgmt_window_get_mini_icon = &xfw_window_get_mini_icon;
wintc_wndmgmt_window_get_name = p_xfw_window_get_name;
wintc_wndmgmt_window_is_skip_tasklist = p_xfw_window_is_skip_tasklist;
wintc_wndmgmt_window_minimize = &xfw_window_minimize;
wintc_wndmgmt_window_unminimize = &xfw_window_unminimize;
return TRUE;
}
@@ -107,21 +107,21 @@ gboolean init_wndmgmt_xfw_impl(void)
// PRIVATE FUNCTIONS
//
static GdkPixbuf* xfw_window_get_mini_icon(
WndMgmtWindow* window
WinTCWndMgmtWindow* window
)
{
return p_xfw_window_get_icon(window, 16, 1);
}
static void xfw_window_minimize(
WndMgmtWindow* window
WinTCWndMgmtWindow* window
)
{
p_xfw_window_set_minimized(window, TRUE, NULL);
}
static void xfw_window_unminimize(
WndMgmtWindow* window
WinTCWndMgmtWindow* window
)
{
p_xfw_window_set_minimized(window, FALSE, NULL);

View File

@@ -1,5 +1,5 @@
#ifndef __DISPPROTO_WNDMGMT_XFW_H__
#define __DISPPROTO_WNDMGMT_XFW_H__
#ifndef __IMPL_WNDMGMT_XFW_H__
#define __IMPL_WNDMGMT_XFW_H__
#include <glib.h>

View File

@@ -3,9 +3,11 @@
#include <gtk/gtk.h>
#include <wintc-comgtk.h>
#include "dispproto.h"
#include "dispproto-x11.h"
#include "taskband.h"
#include "api.h"
#include "impl-x11.h"
// FIXME: Remove this before release
#define TASKBAND_ROW_HEIGHT 30
//
// STRUCTURE DEFINITIONS
@@ -36,6 +38,9 @@ struct X11Struts
static void x11_anchor_taskband_to_bottom(
GtkWindow* taskband
);
static void x11_become_desktop_window(
GtkWindow* window
);
static void on_taskband_realized(
GtkWidget* self,
@@ -47,7 +52,8 @@ static void on_taskband_realized(
//
gboolean init_x11_protocol_impl(void)
{
anchor_taskband_to_bottom = &x11_anchor_taskband_to_bottom;
wintc_anchor_taskband_to_bottom = &x11_anchor_taskband_to_bottom;
wintc_become_desktop_window = &x11_become_desktop_window;
return TRUE;
}
@@ -67,6 +73,51 @@ static void x11_anchor_taskband_to_bottom(
);
}
static void x11_become_desktop_window(
GtkWindow* window
)
{
// Set up window size / position
//
GdkDisplay* display = gdk_display_get_default();
GdkRectangle geometry;
GdkMonitor* monitor = NULL;
int monitor_count = gdk_display_get_n_monitors(display);
gint work_height = 0;
gint work_width = 0;
for (int i = 0; i < monitor_count; i++)
{
gint bottom;
gint right;
monitor = gdk_display_get_monitor(display, i);
gdk_monitor_get_geometry(monitor, &geometry);
bottom = geometry.y + geometry.height;
right = geometry.x + geometry.width;
if (bottom > work_height)
{
work_height = bottom;
}
if (right > work_width)
{
work_width = right;
}
}
gtk_window_move(window, 0, 0);
gtk_window_set_type_hint(window, GDK_WINDOW_TYPE_HINT_DESKTOP);
gtk_widget_set_size_request(
GTK_WIDGET(window),
work_width,
work_height
);
}
//
// CALLBACKS
//
@@ -83,7 +134,7 @@ static void on_taskband_realized(
GdkAtom net_wm_strut_partial_atom;
int screen_bottom = 0;
cardinal_atom =
cardinal_atom =
gdk_atom_intern_static_string("CARDINAL");
net_wm_strut_partial_atom =
gdk_atom_intern_static_string("_NET_WM_STRUT_PARTIAL");
@@ -128,7 +179,7 @@ static void on_taskband_realized(
struts.bottom =
screen_bottom - (geometry.y + geometry.height) + TASKBAND_ROW_HEIGHT;
struts.bottom_start_x = geometry.x;
struts.bottom_end_x = geometry.x + geometry.width;
struts.bottom_end_x = geometry.x + geometry.width;
gdk_property_change(
gtk_widget_get_window(self),

View File

@@ -1,5 +1,5 @@
#ifndef __DISPPROTO_X11_H__
#define __DISPPROTO_X11_H__
#ifndef __IMPL_X11_H__
#define __IMPL_X11_H__
#include <glib.h>

View File

@@ -0,0 +1,73 @@
cmake_minimum_required(VERSION 3.0)
project(
wintc-desktop
VERSION 1.0
DESCRIPTION "Windows Total Conversion desktop application"
LANGUAGES C
)
set(PROJECT_ANYARCH false)
set(PROJECT_FREESTATUS true)
set(PROJECT_MAINTAINER "Rory Fewell <roryf@oddmatics.uk>")
set(PROJECT_ROOT ${CMAKE_CURRENT_LIST_DIR})
include(GNUInstallDirs)
include(../../packaging/cmake-inc/common/CMakeLists.txt)
include(../../packaging/cmake-inc/linking/CMakeLists.txt)
include(../../packaging/cmake-inc/packaging/CMakeLists.txt)
wintc_resolve_library(glib-2.0 GLIB)
wintc_resolve_library(gtk+-3.0 GTK3)
wintc_resolve_library(wintc-comgtk WINTC_COMGTK)
wintc_resolve_library(wintc-shelldpa WINTC_SHELLDPA)
add_executable(
wintc-desktop
src/application.c
src/application.h
src/main.c
src/window.c
src/window.h
)
target_compile_options(
wintc-desktop
PRIVATE ${WINTC_COMPILE_OPTIONS}
)
target_include_directories(
wintc-desktop
SYSTEM
PRIVATE ${GLIB_INCLUDE_DIRS}
PRIVATE ${GTK3_INCLUDE_DIRS}
PRIVATE ${WINTC_COMGTK_INCLUDE_DIRS}
PRIVATE ${WINTC_SHELLDPA_INCLUDE_DIRS}
)
target_link_directories(
wintc-desktop
PRIVATE ${GLIB_LIBRARY_DIRS}
PRIVATE ${GTK3_LIBRARY_DIRS}
PRIVATE ${WINTC_COMGTK_LIBRARY_DIRS}
PRIVATE ${WINTC_SHELLDPA_LIBRARY_DIRS}
)
target_link_libraries(
wintc-desktop
PRIVATE ${GLIB_LIBRARIES}
PRIVATE ${GTK3_LIBRARIES}
PRIVATE ${WINTC_COMGTK_LIBRARIES}
PRIVATE ${WINTC_SHELLDPA_LIBRARIES}
)
# Installation
#
wintc_configure_and_install_packaging()
install(
TARGETS wintc-desktop
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

4
shell/desktop/README.MD Normal file
View File

@@ -0,0 +1,4 @@
# wintc-desktop
This directory contains the source code for the desktop.
(no image, because it's just a blue background for now)

4
shell/desktop/deps Normal file
View File

@@ -0,0 +1,4 @@
bt,rt:glib2
bt,rt:gtk3
bt,rt:wintc-comgtk
bt,rt:wintc-shelldpa

View File

@@ -0,0 +1,112 @@
#include <glib.h>
#include <gtk/gtk.h>
#include <wintc-comgtk.h>
#include <wintc-shelldpa.h>
#include "application.h"
#include "window.h"
//
// GTK OOP CLASS/INSANCE DEFINITIONS
//
struct _WinTCDesktopApplicationClass
{
GtkApplicationClass __parent__;
};
struct _WinTCDesktopApplication
{
GtkApplication __parent__;
GtkWidget* host_window;
};
//
// FORWARD DECLARATIONS
//
static void wintc_desktop_application_activate(
GApplication* application
);
static void wintc_desktop_application_startup(
GApplication* application
);
//
// GTK TYPE DEFINITION & CTORS
//
G_DEFINE_TYPE(
WinTCDesktopApplication,
wintc_desktop_application,
GTK_TYPE_APPLICATION
)
static void wintc_desktop_application_class_init(
WinTCDesktopApplicationClass* klass
)
{
GApplicationClass* application_class = G_APPLICATION_CLASS(klass);
application_class->activate = wintc_desktop_application_activate;
application_class->startup = wintc_desktop_application_startup;
}
static void wintc_desktop_application_init(
WINTC_UNUSED(WinTCDesktopApplication* self)
) {}
//
// PUBLIC FUNCTIONS
//
WinTCDesktopApplication* wintc_desktop_application_new(void)
{
WinTCDesktopApplication* app;
g_set_application_name("Desktop");
app =
g_object_new(
wintc_desktop_application_get_type(),
"application-id", "uk.co.oddmatics.wintc.desktop",
NULL
);
return app;
}
//
// CALLBACKS
//
static void wintc_desktop_application_activate(
GApplication* application
)
{
WinTCDesktopApplication* desktop_app =
WINTC_DESKTOP_APPLICATION(application);
if (desktop_app->host_window != NULL)
{
return;
}
desktop_app->host_window = wintc_desktop_window_new(desktop_app);
gtk_widget_show_all(desktop_app->host_window);
}
static void wintc_desktop_application_startup(
GApplication* application
)
{
// Chain up for gtk init
//
G_APPLICATION_CLASS(wintc_desktop_application_parent_class)
->startup(application);
// Init APIs at runtime
//
if (!wintc_init_display_protocol_apis())
{
g_critical("%s", "Failed to resolve display protocol APIs.");
g_application_quit(application);
}
}

View File

@@ -0,0 +1,27 @@
#ifndef __APPLICATION_H__
#define __APPLICATION_H__
#include <glib.h>
#include <gtk/gtk.h>
//
// GTK OOP BOILERPLATE
//
typedef struct _WinTCDesktopApplicationClass WinTCDesktopApplicationClass;
typedef struct _WinTCDesktopApplication WinTCDesktopApplication;
#define TYPE_WINTC_DESKTOP_APPLICATION (wintc_desktop_application_get_type())
#define WINTC_DESKTOP_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_WINTC_DESKTOP_APPLICATION, WinTCDesktopApplication))
#define WINTC_DESKTOP_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_WINTC_DESKTOP_APPLICATION, WinTCDesktopApplicationClass))
#define IS_WINTC_DESKTOP_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_WINTC_DESKTOP_APPLICATION))
#define IS_WINTC_DESKTOP_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TYPE_WINTC_DESKTOP_APPLICATION))
#define WINTC_DESKTOP_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_WINTC_DESKTOP_APPLICATION, WinTCDesktopApplicationClass))
GType wintc_desktop_application_get_type(void) G_GNUC_CONST;
//
// PUBLIC FUNCTIONS
//
WinTCDesktopApplication* wintc_desktop_application_new(void);
#endif

20
shell/desktop/src/main.c Normal file
View File

@@ -0,0 +1,20 @@
#include <glib.h>
#include "application.h"
int main(
int argc,
char* argv[]
)
{
// Launch application
//
WinTCDesktopApplication* app = wintc_desktop_application_new();
int status;
status = g_application_run(G_APPLICATION(app), argc, argv);
g_object_unref(app);
return status;
}

View File

@@ -0,0 +1,89 @@
#include <gdk/gdk.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <wintc-comgtk.h>
#include <wintc-shelldpa.h>
#include "application.h"
#include "window.h"
//
// GTK OOP CLASS/INSTANCE DEFINITIONS
//
struct _WinTCDesktopWindowClass
{
GtkApplicationWindowClass __parent__;
};
struct _WinTCDesktopWindow
{
GtkApplicationWindow __parent__;
};
//
// FORWARD DECLARATION
//
static gboolean wintc_desktop_window_draw(
GtkWidget* widget,
cairo_t* cr
);
//
// GTK TYPE DEFINITION & CTORS
//
G_DEFINE_TYPE(
WinTCDesktopWindow,
wintc_desktop_window,
GTK_TYPE_APPLICATION_WINDOW
)
static void wintc_desktop_window_class_init(
WinTCDesktopWindowClass* klass
)
{
GtkWidgetClass* widget_class = GTK_WIDGET_CLASS(klass);
widget_class->draw = wintc_desktop_window_draw;
}
static void wintc_desktop_window_init(
WinTCDesktopWindow* self
)
{
wintc_become_desktop_window(GTK_WINDOW(self));
}
//
// CLASS VIRTUAL METHODS
//
static gboolean wintc_desktop_window_draw(
WINTC_UNUSED(GtkWidget* widget),
cairo_t* cr
)
{
// FIXME: Just drawing default desktop background colour atm
//
cairo_set_source_rgb(cr, 0.0f, 0.298f, 0.596f);
cairo_paint(cr);
return FALSE;
}
//
// PUBLIC FUNCTIONS
//
GtkWidget* wintc_desktop_window_new(
WinTCDesktopApplication* app
)
{
return GTK_WIDGET(
g_object_new(
TYPE_WINTC_DESKTOP_WINDOW,
"application", GTK_APPLICATION(app),
"type", GTK_WINDOW_TOPLEVEL,
"decorated", TRUE,
"resizable", FALSE,
NULL
)
);
}

View File

@@ -0,0 +1,31 @@
#ifndef __WINDOW_H__
#define __WINDOW_H__
#include <glib.h>
#include <gtk/gtk.h>
#include "application.h"
//
// GTK OOP BOILERPLATE
//
typedef struct _WinTCDesktopWindowClass WinTCDesktopWindowClass;
typedef struct _WinTCDesktopWindow WinTCDesktopWindow;
#define TYPE_WINTC_DESKTOP_WINDOW (wintc_desktop_window_get_type())
#define WINTC_DESKTOP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_WINTC_DESKTOP_WINDOW, WinTCDesktopWindow))
#define WINTC_DESKTOP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_WINTC_DESKTOP_WINDOW, WinTCDesktopWindow))
#define IS_WINTC_DESKTOP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_WINTC_DESKTOP_WINDOW))
#define IS_WINTC_DESKTOP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TYPE_WINTC_DESKTOP_WINDOW))
#define WINTC_DESKTOP_WINDOW_GET_CLASS(obj) (G_TYPE_CHECK_INSTANCE_GET_CLASS((obj), TYPE_WINTC_DESKTOP_WINDOW))
GType wintc_desktop_window_get_type(void) G_GNUC_CONST;
//
// PUBLIC FUNCTION
//
GtkWidget* wintc_desktop_window_new(
WinTCDesktopApplication* app
);
#endif

View File

@@ -15,7 +15,7 @@ typedef struct _WinTCRunApplication WinTCRunApplication;
#define WINTC_RUN_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_WINTC_RUN_APPLICATION, WinTCRunApplicationClass))
#define IS_WINTC_RUN_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_WINTC_RUN_APPLICATION))
#define IS_WINTC_RUN_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TYPE_WINTC_RUN_APPLICATION))
#define WINTC_RUN_APPLICATON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_WINTC_RUN_APPLICATION, WinTCRunApplicationClass))
#define WINTC_RUN_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_WINTC_RUN_APPLICATION, WinTCRunApplicationClass))
GType wintc_run_application_get_type(void) G_GNUC_CONST;

View File

@@ -13,8 +13,6 @@ set(PROJECT_MAINTAINER "Rory Fewell <roryf@oddmatics.uk>")
set(PROJECT_ROOT ${CMAKE_CURRENT_LIST_DIR})
set(WINTC_NO_PEDANTIC_COMPILE true) # Necessary because we use dlsym()
include(GNUInstallDirs)
include(../../packaging/cmake-inc/common/CMakeLists.txt)
@@ -30,6 +28,7 @@ wintc_resolve_library(glib-2.0 GLIB)
wintc_resolve_library(gtk+-3.0 GTK3)
wintc_resolve_library(wintc-comgtk WINTC_COMGTK)
wintc_resolve_library(wintc-exec WINTC_EXEC)
wintc_resolve_library(wintc-shelldpa WINTC_SHELLDPA)
wintc_resolve_library(wintc-shllang WINTC_SHLLANG)
wintc_compile_resources()
@@ -39,16 +38,6 @@ add_executable(
wintc-taskband
src/application.c
src/application.h
src/dispproto.c
src/dispproto.h
src/dispproto-wayland.c
src/dispproto-wayland.h
src/dispproto-x11.c
src/dispproto-x11.h
src/dispproto-wndmgmt-wnck.c
src/dispproto-wndmgmt-wnck.h
src/dispproto-wndmgmt-xfw.c
src/dispproto-wndmgmt-xfw.h
src/main.c
src/meta.h
src/resources.c
@@ -83,21 +72,6 @@ target_compile_options(
PRIVATE ${WINTC_COMPILE_OPTIONS}
)
message(
STATUS
"Include dirs: ${GARCON_INCLUDE_DIRS}"
)
message(
STATUS
"Link dirs: ${GARCON_LIBRARY_DIRS}"
)
message(
STATUS
"Link libs: ${GARCON_LIBRARIES}"
)
target_include_directories(
wintc-taskband
SYSTEM
@@ -108,6 +82,7 @@ target_include_directories(
PRIVATE ${GTK3_INCLUDE_DIRS}
PRIVATE ${WINTC_COMGTK_INCLUDE_DIRS}
PRIVATE ${WINTC_EXEC_INCLUDE_DIRS}
PRIVATE ${WINTC_SHELLDPA_INCLUDE_DIRS}
PRIVATE ${WINTC_SHLLANG_INCLUDE_DIRS}
)
@@ -120,12 +95,12 @@ target_link_directories(
PRIVATE ${GTK3_LIBRARY_DIRS}
PRIVATE ${WINTC_COMGTK_LIBRARY_DIRS}
PRIVATE ${WINTC_EXEC_LIBRARY_DIRS}
PRIVATE ${WINTC_SHELLDPA_LIBRARY_DIRS}
PRIVATE ${WINTC_SHLLANG_LIBRARY_DIRS}
)
target_link_libraries(
wintc-taskband
PRIVATE ${CMAKE_DL_LIBS}
PRIVATE ${GARCON_LIBRARIES}
PRIVATE ${GARCON_GTK3_LIBRARIES}
PRIVATE ${GDK_PIXBUF_LIBRARIES}
@@ -133,6 +108,7 @@ target_link_libraries(
PRIVATE ${GTK3_LIBRARIES}
PRIVATE ${WINTC_COMGTK_LIBRARIES}
PRIVATE ${WINTC_EXEC_LIBRARIES}
PRIVATE ${WINTC_SHELLDPA_LIBRARIES}
PRIVATE ${WINTC_SHLLANG_LIBRARIES}
)

View File

@@ -5,4 +5,5 @@ bt,rt:glib2
bt,rt:gtk3
bt,rt:wintc-comgtk
bt,rt:wintc-exec
bt,rt:wintc-shelldpa
bt,rt:wintc-shllang

View File

@@ -1,9 +1,9 @@
#include <glib.h>
#include <gtk/gtk.h>
#include <wintc-comgtk.h>
#include <wintc-shelldpa.h>
#include "application.h"
#include "dispproto.h"
#include "window.h"
//
@@ -104,7 +104,7 @@ static void wintc_taskband_application_startup(
// Init APIs at runtime
//
if (!init_display_protocol_apis())
if (!wintc_init_display_protocol_apis())
{
g_critical("%s", "Failed to resolve display protocol APIs.");
g_application_quit(application);

View File

@@ -1,54 +0,0 @@
#ifndef __DISPPROTO_H__
#define __DISPPROTO_H__
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <glib.h>
#include <gtk/gtk.h>
//
// PUBLIC DEFINES
//
#define WndMgmtScreen void
#define WndMgmtWindow void
//
// PUBLIC ENUMS
//
typedef enum
{
DISPPROTO_X11,
DISPPROTO_WAYLAND
} TaskbandDisplayProtocol;
//
// PUBLIC FUNCTIONS
//
TaskbandDisplayProtocol get_display_protocol_in_use(void);
gboolean init_display_protocol_apis(void);
extern void (*anchor_taskband_to_bottom) (
GtkWindow* taskband
);
extern WndMgmtWindow* (*wndmgmt_screen_get_active_window) (
WndMgmtScreen* screen
);
extern WndMgmtScreen* (*wndmgmt_screen_get_default) (void);
extern GdkPixbuf* (*wndmgmt_window_get_mini_icon) (
WndMgmtWindow* window
);
extern gchar* (*wndmgmt_window_get_name) (
WndMgmtWindow* window
);
extern gboolean (*wndmgmt_window_is_skip_tasklist) (
WndMgmtWindow* window
);
extern void (*wndmgmt_window_minimize) (
WndMgmtWindow* window
);
extern void (*wndmgmt_window_unminimize) (
WndMgmtWindow* window
);
#endif

View File

@@ -6,8 +6,8 @@
#include <pwd.h>
#include <unistd.h>
#include <wintc-comgtk.h>
#include <wintc-shelldpa.h>
#include "../dispproto.h"
#include "../meta.h"
#include "action.h"
#include "placeslist.h"
@@ -114,7 +114,7 @@ StartMenu* start_menu_new(
//
// So... GtkWindow on X11, GtkPopover on Wayland :)
//
if (get_display_protocol_in_use() == DISPPROTO_X11)
if (wintc_get_display_protocol_in_use() == WINTC_DISPPROTO_X11)
{
start_menu->menu = gtk_window_new(GTK_WINDOW_TOPLEVEL);
@@ -170,7 +170,7 @@ StartMenu* start_menu_new(
fake_titlebar
);
}
else if (get_display_protocol_in_use() == DISPPROTO_WAYLAND)
else if (wintc_get_display_protocol_in_use() == WINTC_DISPPROTO_WAYLAND)
{
start_menu->menu = gtk_popover_new(start_button);
}
@@ -206,7 +206,7 @@ void start_menu_present(
gint x;
gint y;
if (get_display_protocol_in_use() == DISPPROTO_X11)
if (wintc_get_display_protocol_in_use() == WINTC_DISPPROTO_X11)
{
gtk_window_present_with_time(
GTK_WINDOW(start_menu->menu),

View File

@@ -2,8 +2,8 @@
#include <gtk/gtk.h>
#include <pango/pango.h>
#include <wintc-comgtk.h>
#include <wintc-shelldpa.h>
#include "../dispproto.h"
#include "windowmonitor.h"
//
@@ -11,53 +11,53 @@
//
typedef struct _WindowManagerSingle
{
GtkToggleButton* button;
GtkImage* button_icon;
gboolean button_synchronizing;
GtkLabel* button_text;
WndMgmtWindow* managed_window;
WindowMonitor* parent_monitor;
GtkToggleButton* button;
GtkImage* button_icon;
gboolean button_synchronizing;
GtkLabel* button_text;
WinTCWndMgmtWindow* managed_window;
WindowMonitor* parent_monitor;
} WindowManagerSingle;
struct _WindowMonitor
{
GtkContainer* container;
WndMgmtScreen* screen;
GHashTable* window_manager_map;
GtkContainer* container;
WinTCWndMgmtScreen* screen;
GHashTable* window_manager_map;
};
//
// FORWARD DECLARATIONS
//
static void on_active_window_changed(
WndMgmtScreen* screen,
WndMgmtWindow* previously_active_window,
gpointer user_data
WinTCWndMgmtScreen* screen,
WinTCWndMgmtWindow* previously_active_window,
gpointer user_data
);
static void on_window_closed(
WndMgmtScreen* screen,
WndMgmtWindow* window,
gpointer user_data
WinTCWndMgmtScreen* screen,
WinTCWndMgmtWindow* window,
gpointer user_data
);
static void on_window_opened(
WndMgmtScreen* screen,
WndMgmtWindow* window,
gpointer user_data
WinTCWndMgmtScreen* screen,
WinTCWndMgmtWindow* window,
gpointer user_data
);
static void on_window_icon_changed(
WndMgmtWindow* window,
gpointer user_data
WinTCWndMgmtWindow* window,
gpointer user_data
);
static void on_window_name_changed(
WndMgmtWindow* window,
gpointer user_data
WinTCWndMgmtWindow* window,
gpointer user_data
);
static void on_window_state_changed(
WndMgmtWindow* window,
gint changed_mask,
gint new_state,
gpointer user_data
WinTCWndMgmtWindow* window,
gint changed_mask,
gint new_state,
gpointer user_data
);
static void on_window_button_toggled(
@@ -85,7 +85,7 @@ WindowMonitor* window_monitor_init_management(
WindowMonitor* window_monitor = g_new(WindowMonitor, 1);
window_monitor->container = container;
window_monitor->screen = wndmgmt_screen_get_default();
window_monitor->screen = wintc_wndmgmt_screen_get_default();
window_monitor->window_manager_map = g_hash_table_new(
g_direct_hash,
g_direct_equal
@@ -127,7 +127,7 @@ static void window_manager_update_icon(
gtk_image_set_from_pixbuf(
window_manager->button_icon,
wndmgmt_window_get_mini_icon(
wintc_wndmgmt_window_get_mini_icon(
window_manager->managed_window
)
);
@@ -141,7 +141,7 @@ static void window_manager_update_state(
gboolean skip_tasklist;
skip_tasklist =
wndmgmt_window_is_skip_tasklist(window_manager->managed_window);
wintc_wndmgmt_window_is_skip_tasklist(window_manager->managed_window);
if (skip_tasklist && window_manager->button != NULL)
{
@@ -218,7 +218,7 @@ static void window_manager_update_text(
)
{
const gchar* new_text =
wndmgmt_window_get_name(window_manager->managed_window);
wintc_wndmgmt_window_get_name(window_manager->managed_window);
gtk_label_set_text(
window_manager->button_text,
@@ -234,17 +234,18 @@ static void window_manager_update_text(
// CALLBACKS
//
static void on_active_window_changed(
WINTC_UNUSED(WndMgmtScreen* screen),
WndMgmtWindow* previously_active_window,
gpointer user_data
WINTC_UNUSED(WinTCWndMgmtScreen* screen),
WinTCWndMgmtWindow* previously_active_window,
gpointer user_data
)
{
WndMgmtWindow* active_window;
WinTCWndMgmtWindow* active_window;
WindowManagerSingle* window_manager_old;
WindowManagerSingle* window_manager_new;
WindowMonitor* window_monitor = (WindowMonitor*) user_data;
active_window = wndmgmt_screen_get_active_window(window_monitor->screen);
active_window =
wintc_wndmgmt_screen_get_active_window(window_monitor->screen);
if (previously_active_window != NULL)
{
@@ -296,9 +297,9 @@ static void on_active_window_changed(
}
static void on_window_closed(
WINTC_UNUSED(WndMgmtScreen* screen),
WndMgmtWindow* window,
gpointer user_data
WINTC_UNUSED(WinTCWndMgmtScreen* screen),
WinTCWndMgmtWindow* window,
gpointer user_data
)
{
WindowManagerSingle* window_manager;
@@ -327,9 +328,9 @@ static void on_window_closed(
}
static void on_window_opened(
WINTC_UNUSED(WndMgmtScreen* screen),
WndMgmtWindow* window,
gpointer user_data
WINTC_UNUSED(WinTCWndMgmtScreen* screen),
WinTCWndMgmtWindow* window,
gpointer user_data
)
{
WindowManagerSingle* window_manager = g_new(WindowManagerSingle, 1);
@@ -371,7 +372,7 @@ static void on_window_opened(
}
static void on_window_icon_changed(
WINTC_UNUSED(WndMgmtWindow* window),
WINTC_UNUSED(WinTCWndMgmtWindow* window),
gpointer user_data
)
{
@@ -381,7 +382,7 @@ static void on_window_icon_changed(
}
static void on_window_name_changed(
WINTC_UNUSED(WndMgmtWindow* window),
WINTC_UNUSED(WinTCWndMgmtWindow* window),
gpointer user_data
)
{
@@ -391,7 +392,7 @@ static void on_window_name_changed(
}
static void on_window_state_changed(
WINTC_UNUSED(WndMgmtWindow* window),
WINTC_UNUSED(WinTCWndMgmtWindow* window),
WINTC_UNUSED(gint changed_mask),
WINTC_UNUSED(gint new_state),
gpointer user_data
@@ -416,10 +417,10 @@ static void on_window_button_toggled(
if (gtk_toggle_button_get_active(button))
{
wndmgmt_window_unminimize(window_manager->managed_window);
wintc_wndmgmt_window_unminimize(window_manager->managed_window);
}
else
{
wndmgmt_window_minimize(window_manager->managed_window);
wintc_wndmgmt_window_minimize(window_manager->managed_window);
}
}

View File

@@ -2,9 +2,9 @@
#include <glib.h>
#include <gtk/gtk.h>
#include <wintc-comgtk.h>
#include <wintc-shelldpa.h>
#include "application.h"
#include "dispproto.h"
#include "window.h"
#include "start/startbutton.h"
#include "systray/notifarea.h"
@@ -63,7 +63,7 @@ static void wintc_taskband_window_init(
"wintc-taskband"
);
anchor_taskband_to_bottom(GTK_WINDOW(self));
wintc_anchor_taskband_to_bottom(GTK_WINDOW(self));
//
// SET UP CHILDREN IN HERE

View File

@@ -8,6 +8,7 @@ python3-venv-->bt,rt-->python3
sass-->bt,rt-->ruby-sass
wintc-comgtk-->bt,rt-->wintc-comgtk
wintc-exec-->bt,rt-->wintc-exec
wintc-shelldpa-->bt,rt-->wintc-shelldpa
wintc-shllang-->bt,rt-->wintc-shllang
wintc-winbrand-->bt,rt-->wintc-winbrand
xcursorgen-->bt,rt-->xorg-xcursorgen

View File

@@ -13,6 +13,7 @@ python3-venv-->bt,rt-->python3-venv
sass-->bt,rt-->ruby-sass
wintc-comgtk-->bt,rt-->libwintc-comgtk
wintc-exec-->bt,rt-->libwintc-exec
wintc-shelldpa-->bt,rt-->libwintc-shelldpa
wintc-shllang-->bt,rt-->libwintc-shllang
wintc-winbrand-->bt,rt-->libwintc-winbrand
xcursorgen-->bt,rt-->x11-apps