Because of the discussion "optimal rotation" i rewrote the hack for openbox.
* it is now using the real screen size and recognizes therefore the rotation. * popups are now not more fullscreen * the before patched file prompt.c is now again original. is there someone willing to re-test my patch before giving this into the repo ? here we go: *** openbox-3.4.7.2.original/openbox/client.c 2009-11-10 17:45:17.000000000 +0100 --- openbox-3.4.7.2.patched/openbox/client.c 2009-11-11 11:22:30.000000000 +0100 *************** *** 451,456 **** --- 451,460 ---- !(self->decorations == 0 && RECT_EQUAL(place, *monitor))))) { Rect *a = screen_area(self->desktop, SCREEN_AREA_ONE_MONITOR, &place); + /* matz added */ + ob_debug("screen aread: %d x %d\n", a->width, a->height); + ob_debug("matzhack file %s line %d\n", __FILE__, __LINE__ ); + /* end matz added */ /* get the size of the frame */ place.width += self->frame->size.left + self->frame->size.right; *************** *** 1205,1210 **** --- 1209,1222 ---- ret = XGetWindowAttributes(ob_display, self->window, &wattrib); g_assert(ret != BadWindow); + /* matz changed */ + if ( self->type == 7 ) { + ob_debug("matzhack file %s line %d\n", __FILE__, __LINE__ ); + wattrib.width = WidthOfScreen(DefaultScreenOfDisplay(ob_display)); + wattrib.height = HeightOfScreen(DefaultScreenOfDisplay(ob_display)); + } + /* end matz changed */ + RECT_SET(self->area, wattrib.x, wattrib.y, wattrib.width, wattrib.height); POINT_SET(self->root_pos, wattrib.x, wattrib.y); self->border_width = wattrib.border_width; *************** *** 1625,1638 **** { XSizeHints size; glong ret; /* defaults */ self->min_ratio = 0.0f; self->max_ratio = 0.0f; SIZE_SET(self->size_inc, 1, 1); ! SIZE_SET(self->base_size, -1, -1); ! SIZE_SET(self->min_size, 0, 0); ! SIZE_SET(self->max_size, G_MAXINT, G_MAXINT); /* get the hints from the window */ if (XGetWMNormalHints(ob_display, self->window, &size, &ret)) { --- 1637,1666 ---- { XSizeHints size; glong ret; + /* matz hacked */ + int w, h; + /* end matz hacked */ /* defaults */ self->min_ratio = 0.0f; self->max_ratio = 0.0f; + + /* matz hacked */ + ob_debug("matzhack file %s line %d\n", __FILE__, __LINE__ ); + w = WidthOfScreen(DefaultScreenOfDisplay(ob_display)); + h = HeightOfScreen(DefaultScreenOfDisplay(ob_display)); + if ( self->type != 7 ) { + SIZE_SET(self->base_size, -1, -1); + SIZE_SET(self->min_size, 0, 0); + SIZE_SET(self->max_size, G_MAXINT, G_MAXINT); + } + else { + SIZE_SET(self->base_size, w, h); + SIZE_SET(self->min_size, w, h); + SIZE_SET(self->max_size, w, h); + } SIZE_SET(self->size_inc, 1, 1); ! /* end matz hacked */ /* get the hints from the window */ if (XGetWMNormalHints(ob_display, self->window, &size, &ret)) { *************** *** 1655,1667 **** } if (size.flags & PMinSize) ! SIZE_SET(self->min_size, size.min_width, size.min_height); if (size.flags & PMaxSize) ! SIZE_SET(self->max_size, size.max_width, size.max_height); if (size.flags & PBaseSize) SIZE_SET(self->base_size, size.base_width, size.base_height); if (size.flags & PResizeInc && size.width_inc && size.height_inc) SIZE_SET(self->size_inc, size.width_inc, size.height_inc); --- 1683,1698 ---- } if (size.flags & PMinSize) ! SIZE_SET(self->min_size, size.min_width, size.min_height); ! /* SIZE_SET(self->min_size, 480, 550); */ if (size.flags & PMaxSize) ! SIZE_SET(self->max_size, size.max_width, size.max_height); ! /* SIZE_SET(self->max_size, 480, 640); */ if (size.flags & PBaseSize) SIZE_SET(self->base_size, size.base_width, size.base_height); + /* SIZE_SET(self->base_size, 480, 550); */ if (size.flags & PResizeInc && size.width_inc && size.height_inc) SIZE_SET(self->size_inc, size.width_inc, size.height_inc); *************** *** 2986,2991 **** --- 3017,3033 ---- } } + /* matz hacked */ + if ( self->type == 7 ) { + ob_debug("matzhack x,y,w,h: %d,%d %dx%d file %s line %d\n", *x, *y, *w, *h, __FILE__, __LINE__ ); + *x = *y = 0; + *w = WidthOfScreen(DefaultScreenOfDisplay(ob_display)); + *h = HeightOfScreen(DefaultScreenOfDisplay(ob_display)) - ob_rr_theme->title_height; + ob_debug("matzhack x,y,w,h: %d,%d %dx%d file %s line %d\n", *x, *y, *w, *h, __FILE__, __LINE__ ); + } + /* end matz hacked */ + + g_assert(*w > 0); g_assert(*h > 0); } *************** *** 3098,3103 **** --- 3140,3157 ---- event.xconfigure.event = self->window; event.xconfigure.window = self->window; + /* matz hacked */ + if ( self->type == 7 ) { + ob_debug("matzhack file %s line %d\n", __FILE__, __LINE__ ); + self->root_pos.x = self->root_pos.y = 0; + /* + if ( self->root_pos.y == 0 ) { // FIXME: can not be, we have always a decoration ? + self->root_pos.y = 58; // FIXME: determine real size of decoration + h = h - self->root_pos.y; + } + */ + } + /* end matz hacked */ ob_debug("Sending ConfigureNotify to %s for %d,%d %dx%d\n", self->title, self->root_pos.x, self->root_pos.y, w, h); _______________________________________________ devel mailing list devel@lists.openmoko.org https://lists.openmoko.org/mailman/listinfo/devel