wnck_window_get_geometry() and wnck_window_get_client_window_geometry() return same values
Hello,
I am using wnck for a dogfood window tiler for XFCE/XFWM running on Arch. I notice that wnck_window_get_geometry()
and wnck_window_get_client_window_geometry()
often return identical values given the same window.
Example code:
WnckScreen* screen = wnck_screen_get_default();
WnckWindow* window = wnck_screen_get_active_window(screen);
WnckApplication* application = wnck_window_get_application(window);
const char* appName = g_strdup(wnck_application_get_name(application));
printf("appName: %s\n", appName);
int clientActiveX, clientActiveY, clientActiveWidth, clientActiveHeight;
wnck_window_get_client_window_geometry(window, &clientActiveX, &clientActiveY, &clientActiveWidth, &clientActiveHeight);
printf("[CLIENT ACTIVE]\nclientActiveX: %d\nclientActiveY: %d\nclientActiveWidth: %d\nclientActiveHeight: %d\n",
clientActiveX, clientActiveY, clientActiveWidth, clientActiveHeight);
int activeX, activeY, activeWidth, activeHeight;
wnck_window_get_geometry(window, &activeX, &activeY, &activeWidth, &activeHeight);
printf("[ACTIVE]\nactiveX: %d\nactiveY: %d\nactiveWidth: %d\nactiveHeight: %d\n",
activeX, activeY, activeWidth, activeHeight);
Run the above code while a gedit window is active, for example, and here is a sample output:
appName: gedit
[CLIENT ACTIVE]
clientActiveX: 2502
clientActiveY: 87
clientActiveWidth: 951
clientActiveHeight: 1017
[ACTIVE]
activeX: 2502
activeY: 87
activeWidth: 951
activeHeight: 1017
This is puzzling to me as QuickTile (uses Python bindings to wnck) seems to be able to handle this situation fine, however I haven't been able to determine how.
Edited by Morgan Davis