projects
/
dana
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
262591e
)
use const Rect* not Rect const*
author
Dana Jansens
<danakj@orodu.net>
Fri, 16 Apr 2010 15:31:22 +0000
(11:31 -0400)
committer
Dana Jansens
<danakj@orodu.net>
Fri, 16 Apr 2010 15:37:21 +0000
(11:37 -0400)
13 files changed:
openbox/client.c
patch
|
blob
|
history
openbox/dock.c
patch
|
blob
|
history
openbox/focus_cycle_popup.c
patch
|
blob
|
history
openbox/frame.c
patch
|
blob
|
history
openbox/keyboard.c
patch
|
blob
|
history
openbox/menuframe.c
patch
|
blob
|
history
openbox/moveresize.c
patch
|
blob
|
history
openbox/place.c
patch
|
blob
|
history
openbox/popup.c
patch
|
blob
|
history
openbox/prompt.c
patch
|
blob
|
history
openbox/resist.c
patch
|
blob
|
history
openbox/screen.c
patch
|
blob
|
history
openbox/screen.h
patch
|
blob
|
history
diff --git
a/openbox/client.c
b/openbox/client.c
index
adbbc13
..
755e9ad
100644
(file)
--- a/
openbox/client.c
+++ b/
openbox/client.c
@@
-2043,7
+2043,7
@@
void client_update_strut(ObClient *self)
if (!got &&
OBT_PROP_GETA32(self->window, NET_WM_STRUT, CARDINAL, &data, &num)) {
if (num == 4) {
if (!got &&
OBT_PROP_GETA32(self->window, NET_WM_STRUT, CARDINAL, &data, &num)) {
if (num == 4) {
-
Rect cons
t *a;
+
const Rec
t *a;
got = TRUE;
got = TRUE;
@@
-2468,10
+2468,10
@@
gboolean client_has_parent(ObClient *self)
return self->parents != NULL;
}
return self->parents != NULL;
}
-gboolean client_is_oldfullscreen(const ObClient
const
*self,
- const Rect
const
*area)
+gboolean client_is_oldfullscreen(const ObClient *self,
+ const Rect *area)
{
{
-
Rect cons
t *monitor, *allmonitors;
+
const Rec
t *monitor, *allmonitors;
/* No decorations and fills the monitor = oldskool fullscreen.
But not for maximized windows.
/* No decorations and fills the monitor = oldskool fullscreen.
But not for maximized windows.
@@
-2489,7
+2489,7
@@
gboolean client_is_oldfullscreen(const ObClient const *self,
static ObStackingLayer calc_layer(ObClient *self)
{
ObStackingLayer l;
static ObStackingLayer calc_layer(ObClient *self)
{
ObStackingLayer l;
-
Rect cons
t *monitor, *allmonitors;
+
const Rec
t *monitor, *allmonitors;
monitor = screen_physical_area_monitor(client_monitor(self));
allmonitors = screen_physical_area_all_monitors();
monitor = screen_physical_area_monitor(client_monitor(self));
allmonitors = screen_physical_area_all_monitors();
@@
-2842,7
+2842,7
@@
void client_try_configure(ObClient *self, gint *x, gint *y, gint *w, gint *h,
/* set the size and position if fullscreen */
if (self->fullscreen) {
/* set the size and position if fullscreen */
if (self->fullscreen) {
-
Rect cons
t *a;
+
const Rec
t *a;
guint i;
i = screen_find_monitor(&desired);
guint i;
i = screen_find_monitor(&desired);
diff --git
a/openbox/dock.c
b/openbox/dock.c
index
e3ad2bc
..
3a58344
100644
(file)
--- a/
openbox/dock.c
+++ b/
openbox/dock.c
@@
-236,7
+236,7
@@
void dock_configure(void)
gint gravity;
gint l, r, t, b;
gint strw, strh;
gint gravity;
gint l, r, t, b;
gint strw, strh;
-
Rect cons
t *a;
+
const Rec
t *a;
gint hidesize;
RrMargins(dock->a_frame, &l, &t, &r, &b);
gint hidesize;
RrMargins(dock->a_frame, &l, &t, &r, &b);
diff --git
a/openbox/focus_cycle_popup.c
b/openbox/focus_cycle_popup.c
index
16770ed
..
ba2b468
100644
(file)
--- a/
openbox/focus_cycle_popup.c
+++ b/
openbox/focus_cycle_popup.c
@@
-392,7
+392,7
@@
static void popup_render(ObFocusCyclePopup *p, const ObClient *c)
gint ml, mt, mr, mb;
gint l, t, r, b;
gint x, y, w, h;
gint ml, mt, mr, mb;
gint l, t, r, b;
gint x, y, w, h;
-
Rect cons
t *screen_area = NULL;
+
const Rec
t *screen_area = NULL;
gint i;
GList *it;
const ObFocusCyclePopupTarget *newtarget;
gint i;
GList *it;
const ObFocusCyclePopupTarget *newtarget;
@@
-759,7
+759,7
@@
void focus_cycle_popup_single_show(struct _ObClient *c,
/* do this stuff only when the dialog is first showing */
if (!popup.mapped) {
/* do this stuff only when the dialog is first showing */
if (!popup.mapped) {
-
Rect cons
t *a;
+
const Rec
t *a;
popup_setup(&popup, FALSE, FALSE);
g_assert(popup.targets == NULL);
popup_setup(&popup, FALSE, FALSE);
g_assert(popup.targets == NULL);
diff --git
a/openbox/frame.c
b/openbox/frame.c
index
f6304f5
..
f4a2928
100644
(file)
--- a/
openbox/frame.c
+++ b/
openbox/frame.c
@@
-1677,7
+1677,9
@@
static gboolean frame_animate_iconify(gpointer p)
if (self->client->icon_geometry.width == 0) {
/* there is no icon geometry set so just go straight down */
if (self->client->icon_geometry.width == 0) {
/* there is no icon geometry set so just go straight down */
- Rect const *a = screen_physical_area_monitor(screen_find_monitor(&self->area));
+ const Rect *a;
+
+ a = screen_physical_area_monitor(screen_find_monitor(&self->area));
iconx = self->area.x + self->area.width / 2 + 32;
icony = a->y + a->width;
iconw = 64;
iconx = self->area.x + self->area.width / 2 + 32;
icony = a->y + a->width;
iconw = 64;
diff --git
a/openbox/keyboard.c
b/openbox/keyboard.c
index
9b74c28
..
ad4e4f3
100644
(file)
--- a/
openbox/keyboard.c
+++ b/
openbox/keyboard.c
@@
-79,7
+79,7
@@
static void set_curpos(KeyBindingTree *newpos)
if (curpos != NULL) {
gchar *text = NULL;
GList *it;
if (curpos != NULL) {
gchar *text = NULL;
GList *it;
-
Rect cons
t *a;
+
const Rec
t *a;
for (it = curpos->keylist; it; it = g_list_next(it)) {
gchar *oldtext = text;
for (it = curpos->keylist; it; it = g_list_next(it)) {
gchar *oldtext = text;
diff --git
a/openbox/menuframe.c
b/openbox/menuframe.c
index
85f0951
..
9127257
100644
(file)
--- a/
openbox/menuframe.c
+++ b/
openbox/menuframe.c
@@
-321,7
+321,7
@@
static void menu_frame_place_submenu(ObMenuFrame *self, gint *x, gint *y)
void menu_frame_move_on_screen(ObMenuFrame *self, gint x, gint y,
gint *dx, gint *dy)
{
void menu_frame_move_on_screen(ObMenuFrame *self, gint x, gint y,
gint *dx, gint *dy)
{
-
Rect cons
t *a = NULL;
+
const Rec
t *a = NULL;
gint pos, half;
*dx = *dy = 0;
gint pos, half;
*dx = *dy = 0;
@@
-831,7
+831,7
@@
void menu_frame_render(ObMenuFrame *self)
static void menu_frame_update(ObMenuFrame *self)
{
GList *mit, *fit;
static void menu_frame_update(ObMenuFrame *self)
{
GList *mit, *fit;
-
Rect cons
t *a;
+
const Rec
t *a;
gint h;
menu_pipe_execute(self->menu);
gint h;
menu_pipe_execute(self->menu);
diff --git
a/openbox/moveresize.c
b/openbox/moveresize.c
index
466d866
..
8609d3b
100644
(file)
--- a/
openbox/moveresize.c
+++ b/
openbox/moveresize.c
@@
-112,7
+112,7
@@
static void popup_coords(ObClient *c, const gchar *format, gint a, gint b)
c->frame->area.x + c->frame->area.width / 2,
c->frame->area.y + c->frame->area.height / 2);
else /* Fixed */ {
c->frame->area.x + c->frame->area.width / 2,
c->frame->area.y + c->frame->area.height / 2);
else /* Fixed */ {
-
Rect cons
t *area = screen_physical_area_active();
+
const Rec
t *area = screen_physical_area_active();
gint gravity, x, y;
x = config_resize_popup_fixed.x.pos;
gint gravity, x, y;
x = config_resize_popup_fixed.x.pos;
@@
-554,7
+554,7
@@
static void do_edge_warp(gint x, gint y)
dir = -1;
for (i = 0; i < screen_num_monitors; ++i) {
dir = -1;
for (i = 0; i < screen_num_monitors; ++i) {
-
Rect cons
t *a = screen_physical_area_monitor(i);
+
const Rec
t *a = screen_physical_area_monitor(i);
if (x == RECT_LEFT(*a)) dir = OB_DIRECTION_WEST;
if (x == RECT_RIGHT(*a)) dir = OB_DIRECTION_EAST;
if (y == RECT_TOP(*a)) dir = OB_DIRECTION_NORTH;
if (x == RECT_LEFT(*a)) dir = OB_DIRECTION_WEST;
if (x == RECT_RIGHT(*a)) dir = OB_DIRECTION_EAST;
if (y == RECT_TOP(*a)) dir = OB_DIRECTION_NORTH;
diff --git
a/openbox/place.c
b/openbox/place.c
index
836c215
..
c39d506
100644
(file)
--- a/
openbox/place.c
+++ b/
openbox/place.c
@@
-107,7
+107,7
@@
static Rect **pick_head(ObClient *c)
screen_pointer_pos(&px, &py);
for (i = 0; i < screen_num_monitors; i++) {
screen_pointer_pos(&px, &py);
for (i = 0; i < screen_num_monitors; i++) {
-
Rect cons
t *monitor = screen_physical_area_monitor(i);
+
const Rec
t *monitor = screen_physical_area_monitor(i);
gboolean contain = RECT_CONTAINS(*monitor, px, py);
if (contain) {
add_choice(choice, i);
gboolean contain = RECT_CONTAINS(*monitor, px, py);
if (contain) {
add_choice(choice, i);
diff --git
a/openbox/popup.c
b/openbox/popup.c
index
8793acc
..
7d59d91
100644
(file)
--- a/
openbox/popup.c
+++ b/
openbox/popup.c
@@
-158,7
+158,7
@@
void popup_delay_show(ObPopup *self, gulong usec, gchar *text)
gint emptyx, emptyy; /* empty space between elements */
gint textx, texty, textw, texth;
gint iconx, icony, iconw, iconh;
gint emptyx, emptyy; /* empty space between elements */
gint textx, texty, textw, texth;
gint iconx, icony, iconw, iconh;
-
Rect cons
t *area;
+
const Rec
t *area;
Rect mon;
gboolean hasicon = self->hasicon;
Rect mon;
gboolean hasicon = self->hasicon;
diff --git
a/openbox/prompt.c
b/openbox/prompt.c
index
3c5de40
..
50d0903
100644
(file)
--- a/
openbox/prompt.c
+++ b/
openbox/prompt.c
@@
-269,7
+269,7
@@
static void prompt_layout(ObPrompt *self)
b += OUTSIDE_MARGIN;
{
b += OUTSIDE_MARGIN;
{
-
Rect cons
t *area = screen_physical_area_all_monitors();
+
const Rec
t *area = screen_physical_area_all_monitors();
maxw = MIN(MAX_WIDTH, area->width*4/5);
}
maxw = MIN(MAX_WIDTH, area->width*4/5);
}
diff --git
a/openbox/resist.c
b/openbox/resist.c
index
927ee3a
..
12f5632
100644
(file)
--- a/
openbox/resist.c
+++ b/
openbox/resist.c
@@
-136,7
+136,7
@@
void resist_move_windows(ObClient *c, gint resist, gint *x, gint *y)
void resist_move_monitors(ObClient *c, gint resist, gint *x, gint *y)
{
Rect *area;
void resist_move_monitors(ObClient *c, gint resist, gint *x, gint *y)
{
Rect *area;
-
Rect cons
t *parea;
+
const Rec
t *parea;
guint i;
gint l, t, r, b; /* requested edges */
gint al, at, ar, ab; /* screen area edges */
guint i;
gint l, t, r, b; /* requested edges */
gint al, at, ar, ab; /* screen area edges */
@@
-325,7
+325,7
@@
void resist_size_monitors(ObClient *c, gint resist, gint *w, gint *h,
gint l, t, r, b; /* my left, top, right and bottom sides */
gint dlt, drb; /* my destination left/top and right/bottom sides */
Rect *area;
gint l, t, r, b; /* my left, top, right and bottom sides */
gint dlt, drb; /* my destination left/top and right/bottom sides */
Rect *area;
-
Rect cons
t *parea;
+
const Rec
t *parea;
gint al, at, ar, ab; /* screen boundaries */
gint pl, pt, pr, pb; /* physical screen boundaries */
guint i;
gint al, at, ar, ab; /* screen boundaries */
gint pl, pt, pr, pb; /* physical screen boundaries */
guint i;
diff --git
a/openbox/screen.c
b/openbox/screen.c
index
d69b244
..
e939b01
100644
(file)
--- a/
openbox/screen.c
+++ b/
openbox/screen.c
@@
-939,7
+939,7
@@
static gboolean hide_desktop_popup_func(gpointer data)
void screen_show_desktop_popup(guint d, gboolean perm)
{
void screen_show_desktop_popup(guint d, gboolean perm)
{
-
Rect cons
t *a;
+
const Rec
t *a;
/* 0 means don't show the popup */
if (!config_desktop_popup_time) return;
/* 0 means don't show the popup */
if (!config_desktop_popup_time) return;
@@
-1617,14
+1617,14
@@
Rect* screen_area(guint desktop, guint head, Rect *search)
return a;
}
return a;
}
-guint screen_find_monitor(const Rect
const
*search)
+guint screen_find_monitor(const Rect *search)
{
guint i;
guint most = screen_num_monitors;
guint mostv = 0;
for (i = 0; i < screen_num_monitors; ++i) {
{
guint i;
guint most = screen_num_monitors;
guint mostv = 0;
for (i = 0; i < screen_num_monitors; ++i) {
-
Rect cons
t *area = screen_physical_area_monitor(i);
+
const Rec
t *area = screen_physical_area_monitor(i);
if (RECT_INTERSECTS_RECT(*area, *search)) {
Rect r;
guint v;
if (RECT_INTERSECTS_RECT(*area, *search)) {
Rect r;
guint v;
@@
-1641,12
+1641,12
@@
guint screen_find_monitor(const Rect const *search)
return most;
}
return most;
}
-
Rect cons
t* screen_physical_area_all_monitors(void)
+
const Rec
t* screen_physical_area_all_monitors(void)
{
return screen_physical_area_monitor(screen_num_monitors);
}
{
return screen_physical_area_monitor(screen_num_monitors);
}
-
Rect cons
t* screen_physical_area_monitor(guint head)
+
const Rec
t* screen_physical_area_monitor(guint head)
{
g_assert(head <= screen_num_monitors);
{
g_assert(head <= screen_num_monitors);
@@
-1670,7
+1670,7
@@
guint screen_monitor_active(void)
return screen_monitor_pointer();
}
return screen_monitor_pointer();
}
-
Rect cons
t* screen_physical_area_active(void)
+
const Rec
t* screen_physical_area_active(void)
{
return screen_physical_area_monitor(screen_monitor_active());
}
{
return screen_physical_area_monitor(screen_monitor_active());
}
@@
-1691,7
+1691,7
@@
guint screen_monitor_primary(gboolean fixed)
return screen_monitor_pointer();
}
return screen_monitor_pointer();
}
-
Rect const *
screen_physical_area_primary(gboolean fixed)
+
const Rect*
screen_physical_area_primary(gboolean fixed)
{
return screen_physical_area_monitor(screen_monitor_primary(fixed));
}
{
return screen_physical_area_monitor(screen_monitor_primary(fixed));
}
diff --git
a/openbox/screen.h
b/openbox/screen.h
index
0f79687
..
d15b352
100644
(file)
--- a/
openbox/screen.h
+++ b/
openbox/screen.h
@@
-104,17
+104,17
@@
void screen_install_colormap(struct _ObClient *client, gboolean install);
void screen_update_areas(void);
void screen_update_areas(void);
-
Rect cons
t* screen_physical_area_all_monitors(void);
+
const Rec
t* screen_physical_area_all_monitors(void);
/*! Returns a Rect which is owned by the screen code and should not be freed */
/*! Returns a Rect which is owned by the screen code and should not be freed */
-
Rect cons
t* screen_physical_area_monitor(guint head);
+
const Rec
t* screen_physical_area_monitor(guint head);
/*! Returns the monitor which contains the active window, or the one
containing the pointer otherwise. */
guint screen_monitor_active(void);
/*! Returns a Rect which is owned by the screen code and should not be freed */
/*! Returns the monitor which contains the active window, or the one
containing the pointer otherwise. */
guint screen_monitor_active(void);
/*! Returns a Rect which is owned by the screen code and should not be freed */
-
Rect cons
t* screen_physical_area_active(void);
+
const Rec
t* screen_physical_area_active(void);
/*! Returns the primary monitor, as specified by the config.
@fixed If TRUE, then this will always return a fixed monitor, otherwise
/*! Returns the primary monitor, as specified by the config.
@fixed If TRUE, then this will always return a fixed monitor, otherwise
@@
-128,7
+128,7
@@
guint screen_monitor_primary(gboolean fixed);
See screen_monitor_primary().
@return A Rect which is owned by the screen code and should not be freed
*/
See screen_monitor_primary().
@return A Rect which is owned by the screen code and should not be freed
*/
-
Rect const *
screen_physical_area_primary(gboolean fixed);
+
const Rect*
screen_physical_area_primary(gboolean fixed);
/* doesn't include struts which the search area is already outside of when
'search' is not NULL */
/* doesn't include struts which the search area is already outside of when
'search' is not NULL */
@@
-148,7
+148,7
@@
gboolean screen_physical_area_monitor_contains(guint head, Rect *search);
area of the part of the rectable on each monitor. The number of the
monitor containing the greatest area of the rectangle is returned.
*/
area of the part of the rectable on each monitor. The number of the
monitor containing the greatest area of the rectangle is returned.
*/
-guint screen_find_monitor(const Rect
const
*search);
+guint screen_find_monitor(const Rect *search);
/*! Finds the monitor which contains the point @x, @y */
guint screen_find_monitor_point(guint x, guint y);
/*! Finds the monitor which contains the point @x, @y */
guint screen_find_monitor_point(guint x, guint y);