diff options
| author | Mikael Magnusson <mikachu@comhem.se> | 2006-06-08 11:36:43 +0000 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@comhem.se> | 2006-06-08 11:36:43 +0000 |
| commit | de1559a09497ae4ead44a6e70b556123a5bab35c (patch) | |
| tree | cf4576cf08322f3e7428d7bbdcbdd21e124554f3 /openbox/per_app_settings.c | |
| parent | f80ab241f31676d8ae5377d62986ee793dc27ca7 (diff) | |
move stuff around some more
Diffstat (limited to 'openbox/per_app_settings.c')
| -rw-r--r-- | openbox/per_app_settings.c | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/openbox/per_app_settings.c b/openbox/per_app_settings.c deleted file mode 100644 index 73331cc6..00000000 --- a/openbox/per_app_settings.c +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*- - - client.h for the Openbox window manager - Copyright (c) 2006 Mikael Magnusson - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - See the COPYING file for a copy of the GNU General Public License. -*/ - -#include "per_app_settings.h" -#include "screen.h" -#include "config.h" - -/* XXX put in client.c */ -/* This should possibly do something more interesting than just match - * against WM_CLASS literally. */ -ObAppSetting *get_client_settings(ObClient *client) -{ - GSList *a = config_per_app_settings; - - while (a) { - ObAppSetting *app = (ObAppSetting *) a->data; - - if (!strcmp(app->name, client->name)) { - ob_debug("Window matching: %s\n", app->name); - - return (ObAppSetting *) a->data; - } - - a = a->next; - } - return NULL; -} - -/* XXX put in place.c */ -void place_window_from_settings(ObAppSetting *setting, ObClient *client, gint *x, gint *y) -{ - gint px, py, i; - Rect *screen; - - /* Find which head the pointer is on, partly taken from place.c */ - if (setting->head == -1) { - screen_pointer_pos(&px, &py); - - for (i = 0; i < screen_num_monitors; i++) { - screen = screen_area_monitor(client->desktop, i); - if (RECT_CONTAINS(*screen, px, py)) - break; - } - - if (i == screen_num_monitors) - screen = screen_area_monitor(client->desktop, 0); - } - else - screen = screen_area_monitor(client->desktop, setting->head); - - if (setting->position.x == -1 && setting->center_x) - *x = screen->x + screen->width / 2 - client->area.width / 2; - else if (setting->position.x != -1) - *x = screen->x + setting->position.x; - - if (setting->position.y == -1 && setting->center_y) - *y = screen->y + screen->height / 2 - client->area.height / 2; - else if (setting->position.y != -1) - *y = screen->y + setting->position.y; - -} |
