all repos — openbox @ 34178097d559ef522ea0984091489c209f4e9e0e

openbox fork - make it a bit more like ryudo

use const Rect* not Rect const*
Dana Jansens danakj@orodu.net
commit

34178097d559ef522ea0984091489c209f4e9e0e

parent

262591ec1adc1badfcb36e9e6876dd81f2df9492

M openbox/client.copenbox/client.c

@@ -2043,7 +2043,7 @@

if (!got && OBT_PROP_GETA32(self->window, NET_WM_STRUT, CARDINAL, &data, &num)) { if (num == 4) { - Rect const *a; + const Rect *a; got = TRUE;

@@ -2468,10 +2468,10 @@ {

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 const *monitor, *allmonitors; + const Rect *monitor, *allmonitors; /* No decorations and fills the monitor = oldskool fullscreen. But not for maximized windows.

@@ -2489,7 +2489,7 @@

static ObStackingLayer calc_layer(ObClient *self) { ObStackingLayer l; - Rect const *monitor, *allmonitors; + const Rect *monitor, *allmonitors; monitor = screen_physical_area_monitor(client_monitor(self)); allmonitors = screen_physical_area_all_monitors();

@@ -2842,7 +2842,7 @@ /* these positions are frame positions, not client positions */

/* set the size and position if fullscreen */ if (self->fullscreen) { - Rect const *a; + const Rect *a; guint i; i = screen_find_monitor(&desired);
M openbox/dock.copenbox/dock.c

@@ -236,7 +236,7 @@ gint hspot, vspot;

gint gravity; gint l, r, t, b; gint strw, strh; - Rect const *a; + const Rect *a; gint hidesize; RrMargins(dock->a_frame, &l, &t, &r, &b);
M openbox/focus_cycle_popup.copenbox/focus_cycle_popup.c

@@ -392,7 +392,7 @@ {

gint ml, mt, mr, mb; gint l, t, r, b; gint x, y, w, h; - Rect const *screen_area = NULL; + const Rect *screen_area = NULL; gint i; GList *it; const ObFocusCyclePopupTarget *newtarget;

@@ -759,7 +759,7 @@ g_assert(c != NULL);

/* do this stuff only when the dialog is first showing */ if (!popup.mapped) { - Rect const *a; + const Rect *a; popup_setup(&popup, FALSE, FALSE); g_assert(popup.targets == NULL);
M openbox/frame.copenbox/frame.c

@@ -1677,7 +1677,9 @@ gboolean iconifying;

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;
M openbox/keyboard.copenbox/keyboard.c

@@ -79,7 +79,7 @@

if (curpos != NULL) { gchar *text = NULL; GList *it; - Rect const *a; + const Rect *a; for (it = curpos->keylist; it; it = g_list_next(it)) { gchar *oldtext = text;
M openbox/menuframe.copenbox/menuframe.c

@@ -321,7 +321,7 @@

void menu_frame_move_on_screen(ObMenuFrame *self, gint x, gint y, gint *dx, gint *dy) { - Rect const *a = NULL; + const Rect *a = NULL; gint pos, half; *dx = *dy = 0;

@@ -831,7 +831,7 @@

static void menu_frame_update(ObMenuFrame *self) { GList *mit, *fit; - Rect const *a; + const Rect *a; gint h; menu_pipe_execute(self->menu);
M openbox/moveresize.copenbox/moveresize.c

@@ -112,7 +112,7 @@ popup_position(popup, CenterGravity,

c->frame->area.x + c->frame->area.width / 2, c->frame->area.y + c->frame->area.height / 2); else /* Fixed */ { - Rect const *area = screen_physical_area_active(); + const Rect *area = screen_physical_area_active(); gint gravity, x, y; x = config_resize_popup_fixed.x.pos;

@@ -554,7 +554,7 @@

dir = -1; for (i = 0; i < screen_num_monitors; ++i) { - Rect const *a = screen_physical_area_monitor(i); + const Rect *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;
M openbox/place.copenbox/place.c

@@ -107,7 +107,7 @@

screen_pointer_pos(&px, &py); for (i = 0; i < screen_num_monitors; i++) { - Rect const *monitor = screen_physical_area_monitor(i); + const Rect *monitor = screen_physical_area_monitor(i); gboolean contain = RECT_CONTAINS(*monitor, px, py); if (contain) { add_choice(choice, i);
M openbox/popup.copenbox/popup.c

@@ -158,7 +158,7 @@ guint m;

gint emptyx, emptyy; /* empty space between elements */ gint textx, texty, textw, texth; gint iconx, icony, iconw, iconh; - Rect const *area; + const Rect *area; Rect mon; gboolean hasicon = self->hasicon;
M openbox/prompt.copenbox/prompt.c

@@ -269,7 +269,7 @@ r += OUTSIDE_MARGIN;

b += OUTSIDE_MARGIN; { - Rect const *area = screen_physical_area_all_monitors(); + const Rect *area = screen_physical_area_all_monitors(); maxw = MIN(MAX_WIDTH, area->width*4/5); }
M openbox/resist.copenbox/resist.c

@@ -136,7 +136,7 @@

void resist_move_monitors(ObClient *c, gint resist, gint *x, gint *y) { Rect *area; - Rect const *parea; + const Rect *parea; guint i; gint l, t, r, b; /* requested edges */ gint al, at, ar, ab; /* screen area edges */

@@ -325,7 +325,7 @@ {

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 const *parea; + const Rect *parea; gint al, at, ar, ab; /* screen boundaries */ gint pl, pt, pr, pb; /* physical screen boundaries */ guint i;
M openbox/screen.copenbox/screen.c

@@ -939,7 +939,7 @@ }

void screen_show_desktop_popup(guint d, gboolean perm) { - Rect const *a; + const Rect *a; /* 0 means don't show the popup */ if (!config_desktop_popup_time) return;

@@ -1617,14 +1617,14 @@ a->height = b - t + 1;

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) { - Rect const *area = screen_physical_area_monitor(i); + const Rect *area = screen_physical_area_monitor(i); if (RECT_INTERSECTS_RECT(*area, *search)) { Rect r; guint v;

@@ -1641,12 +1641,12 @@ }

return most; } -Rect const* screen_physical_area_all_monitors(void) +const Rect* screen_physical_area_all_monitors(void) { return screen_physical_area_monitor(screen_num_monitors); } -Rect const* screen_physical_area_monitor(guint head) +const Rect* screen_physical_area_monitor(guint head) { g_assert(head <= screen_num_monitors);

@@ -1670,7 +1670,7 @@ else

return screen_monitor_pointer(); } -Rect const* screen_physical_area_active(void) +const Rect* screen_physical_area_active(void) { return screen_physical_area_monitor(screen_monitor_active()); }

@@ -1691,7 +1691,7 @@ else /* config_primary_monitor == OB_PLACE_MONITOR_MOUSE */

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)); }
M openbox/screen.hopenbox/screen.h

@@ -104,17 +104,17 @@ void screen_install_colormap(struct _ObClient *client, gboolean install);

void screen_update_areas(void); -Rect const* screen_physical_area_all_monitors(void); +const Rect* screen_physical_area_all_monitors(void); /*! Returns a Rect which is owned by the screen code and should not be freed */ -Rect const* screen_physical_area_monitor(guint head); +const Rect* 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 */ -Rect const* screen_physical_area_active(void); +const Rect* 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

@@ -128,7 +128,7 @@ otherwise it may change based on where focus is, or other heuristics.

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 */

@@ -148,7 +148,7 @@ /*! Determines which physical monitor a rectangle is on by calculating the

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);