http://developer.gnome.org/projects/gup/hig/draft_hig_new/windows-alert.html
*/
data = g_strdup("");
- } else
- data = g_strdup(_("Unnamed Window"));
+ } else {
+ if (self->class && *self->class)
+ data = g_strdup(self->class);
+ else if (self->name && *self->name)
+ data = g_strdup(self->name);
+ else
+ data = g_strdup(_("Unnamed Window"));
+ }
}
}
self->original_title = g_strdup(data);
frame_adjust_area(self->frame, FALSE, TRUE, TRUE);
/* cap any X windows at the size of an unsigned short */
+ /* actually make that a bit less, X shits itself on windows this large too */
*w = MIN(*w,
- (gint)G_MAXUSHORT
+ (gint)4096
- self->frame->size.left - self->frame->size.right);
*h = MIN(*h,
- (gint)G_MAXUSHORT
+ (gint)4096
- self->frame->size.top - self->frame->size.bottom);
/* gets the frame's position */
maxratio = self->fullscreen || (self->max_horz && self->max_vert) ?
0 : self->max_ratio;
+ /* XXX TODO FIXME these two fallbacks don't check that the fallback
+ * value itself is specified before using it */
/* base size is substituted with min size if not specified */
if (self->base_size.width >= 0 || self->base_size.height >= 0) {
basew = self->base_size.width;
/* adjust the height to match the width for the aspect ratios.
for this, min size is not substituted for base size ever. */
- *w -= self->base_size.width;
- *h -= self->base_size.height;
+ if (self->base_size.width >= 0 && self->base_size.height >= 0) {
+ *w -= self->base_size.width;
+ *h -= self->base_size.height;
+ }
if (minratio)
if (*h * minratio > *w) {
}
}
- *w += self->base_size.width;
- *h += self->base_size.height;
+ if (self->base_size.width >= 0 && self->base_size.height >= 0) {
+ *w += self->base_size.width;
+ *h += self->base_size.height;
+ }
}
/* these override the above states! if you cant move you can't move! */
{
self = client_focus_target(self);
+ if (self->iconic && self->locked)
+ return;
+
if (client_can_steal_focus(self, desktop, user, event_time(), CurrentTime))
client_present(self, here, raise, unshade);
else