88
86
switch (defaults_get_gravity (d))
90
88
case GRAVITY_NORTH_EAST:
91
async = stack_find_bubble_on_display (self);
95
y += bubble_get_future_height (async);
96
y += EM2PIXELS (defaults_get_bubble_vert_gap (d), d) -
97
2 * EM2PIXELS (defaults_get_bubble_shadow_size (d), d);
89
// see if we're call at the wrong moment, when both
90
// slots are occupied by bubbles
91
if (!stack_is_slot_vacant (self, SLOT_TOP) &&
92
!stack_is_slot_vacant (self, SLOT_BOTTOM))
94
g_warning ("%s(): Both slots taken!\n",
99
// first check if we can place the sync. bubble
100
// in the top slot and the bottom slot is still
101
// vacant, this is to avoid the "gap" between
102
// bottom slot and panel
103
if (stack_is_slot_vacant (self, SLOT_TOP) &&
104
stack_is_slot_vacant (self, SLOT_BOTTOM))
106
stack_get_slot_position (self,
108
bubble_get_height (bubble),
111
if (x == -1 || y == -1)
112
g_warning ("%s(): No coords!\n",
115
stack_allocate_slot (self,
119
// next check if top is occupied and bottom is
120
// still vacant, then place sync. bubble in
122
else if (!stack_is_slot_vacant (self,
124
stack_is_slot_vacant (self,
127
stack_get_slot_position (self,
129
bubble_get_height (bubble),
132
if (x == -1 || y == -1)
133
g_warning ("%s(): No coords!\n",
137
stack_allocate_slot (
144
self->slots[SLOT_TOP]);
147
// this case, top vacant, bottom occupied,
148
// should never happen for the old placement,
149
// we want to avoid the "gap" between the bottom
150
// bubble and the panel
151
else if (stack_is_slot_vacant (self,
153
!stack_is_slot_vacant (self,
156
g_warning ("%s(): Gap, gap, gap!!!\n",
101
162
case GRAVITY_EAST:
102
y += defaults_get_desktop_height (d) / 2 -
103
EM2PIXELS (defaults_get_bubble_vert_gap (d) / 2.0f, d) -
104
bubble_get_height (bubble) +
105
EM2PIXELS (defaults_get_bubble_shadow_size (d), d);
163
// see if reserved top slot for sync. bubble is really
165
if (stack_is_slot_vacant (self, SLOT_TOP) == OCCUPIED)
167
g_warning ("%s(): Top slot taken!\n",
170
// if not just put sync. bubble in top slot
173
stack_get_slot_position (self,
175
bubble_get_height (bubble),
178
if (x == -1 || y == -1)
179
g_warning ("%s(): No slot-coords!\n",
182
stack_allocate_slot (self,
244
325
switch (defaults_get_gravity (d))
246
327
case GRAVITY_NORTH_EAST:
247
if (sync_bubble != NULL && bubble_is_visible (sync_bubble))
250
y += bubble_get_height (sync_bubble);
251
y += EM2PIXELS (defaults_get_bubble_vert_gap (d), d)
252
- 2 * EM2PIXELS (defaults_get_bubble_shadow_size (d), d);
328
if (!stack_is_slot_vacant (self, SLOT_TOP) &&
329
!stack_is_slot_vacant (self, SLOT_BOTTOM))
331
g_warning ("%s(): Both slots taken!\n",
336
if (stack_is_slot_vacant (self, SLOT_TOP))
338
stack_get_slot_position (self,
340
bubble_get_height (bubble),
343
if (x == -1 || y == -1)
344
g_warning ("%s(): No coords!\n",
347
stack_allocate_slot (self,
351
else if (stack_is_slot_vacant (self,
354
stack_get_slot_position (self,
356
bubble_get_height (bubble),
359
if (x == -1 || y == -1)
360
g_warning ("%s(): No coords!\n",
363
stack_allocate_slot (self,
254
// synchronize the sync bubble with the timeout of the bubble at
256
if (stack_is_at_top_corner (self, sync_bubble))
257
bubble_sync_with (sync_bubble, bubble);
369
if (sync_bubble != NULL &&
370
bubble_is_visible (sync_bubble) &&
371
sync_bubble == self->slots[SLOT_TOP])
373
// synchronize the sync bubble with the timeout
374
// of the bubble at the bottom
375
bubble_sync_with (sync_bubble, bubble);
261
379
case GRAVITY_EAST:
262
if (sync_bubble != NULL && bubble_is_visible (sync_bubble))
380
// with the new placement sync. bubbles are always to be
381
// placed in the top slot (above the "half-line")
382
if (bubble_is_synchronous (bubble))
264
y += defaults_get_desktop_height (d) / 2 -
265
EM2PIXELS (defaults_get_bubble_vert_gap (d) / 2.0f, d) -
266
bubble_get_height (sync_bubble) +
267
EM2PIXELS (defaults_get_bubble_shadow_size (d), d);
384
// verify that the top slot is really vacant
385
if (stack_is_slot_vacant (self, SLOT_TOP))
387
stack_get_slot_position (self,
389
bubble_get_height (bubble),
392
if (x == -1 || y == -1)
393
g_warning ("%s(): No coords!\n",
396
stack_allocate_slot (self,
400
// otherwise there's still an error in the
401
// layout- and queue-logic
404
g_warning ("%s(): Can't put sync. "
405
"bubble in top slot!\n",
409
// an async. bubble is always meant to be put in the
410
// bottom slot (below the "half-line")
271
y += defaults_get_desktop_height (d) / 2 +
272
EM2PIXELS (defaults_get_bubble_vert_gap (d) / 2.0f, d) -
273
EM2PIXELS (defaults_get_bubble_shadow_size (d), d);
413
// verify that the bottom slot is really vacant
414
if (stack_is_slot_vacant (self, SLOT_BOTTOM))
416
stack_get_slot_position (self,
418
bubble_get_height (bubble),
421
if (x == -1 || y == -1)
422
g_warning ("%s(): No coords!\n",
425
stack_allocate_slot (
430
// otherwise there's still an error in the
431
// layout- and queue-logic
434
g_warning ("%s(): Can't put async. "
435
"bubble in bottom slot!\n",