summaryrefslogtreecommitdiff
path: root/framebuffer
diff options
context:
space:
mode:
Diffstat (limited to 'framebuffer')
-rw-r--r--framebuffer/fbtk.h5
-rw-r--r--framebuffer/font_internal.c6
-rw-r--r--framebuffer/gui.c14
3 files changed, 19 insertions, 6 deletions
diff --git a/framebuffer/fbtk.h b/framebuffer/fbtk.h
index 220700fef..325db0e9b 100644
--- a/framebuffer/fbtk.h
+++ b/framebuffer/fbtk.h
@@ -312,7 +312,8 @@ int fbtk_destroy_widget(fbtk_widget_t *widget);
/********************************* Widgets *********************************/
-/** Create a window widget.
+/**
+ * Create a window widget.
*
* @param parent The parent window or the root widget for a top level window.
* @param x The x location relative to the parent window.
@@ -323,7 +324,7 @@ int fbtk_destroy_widget(fbtk_widget_t *widget);
* window.
* @param height The height of the window limited in a similar way to the
* /a width.
- * @param c The background colour.
+ * @param bg The background colour.
* @return new window widget handle or NULL on error.
*/
fbtk_widget_t *fbtk_create_window(fbtk_widget_t *parent, int x, int y, int width, int height, colour bg);
diff --git a/framebuffer/font_internal.c b/framebuffer/font_internal.c
index e514b12d9..4edb4ee4c 100644
--- a/framebuffer/font_internal.c
+++ b/framebuffer/font_internal.c
@@ -221,6 +221,12 @@ fb_get_glyph(uint32_t ucs4, enum fb_font_style style)
unsigned int offset;
uint16_t g_offset;
+ /* Internal font has no glyphs beyond U+FFFF and there isn't
+ * space to render a >4 digit codepoint; just show replacement
+ * character. */
+ if (ucs4 > 0xffff)
+ ucs4 = 0xfffd;
+
switch (style) {
case FB_BOLD_ITALIC:
section = fb_bold_italic_section_table[ucs4 / 256];
diff --git a/framebuffer/gui.c b/framebuffer/gui.c
index 251326dc2..2a691f7f6 100644
--- a/framebuffer/gui.c
+++ b/framebuffer/gui.c
@@ -564,10 +564,6 @@ static void framebuffer_poll(bool active)
/* run the scheduler and discover how long to wait for the next event */
timeout = schedule_run();
- /* if active do not wait for event, return immediately */
- if (active)
- timeout = 0;
-
/* if redraws are pending do not wait for event, return immediately */
if (fbtk_get_redraw_pending(fbtk))
timeout = 0;
@@ -1762,6 +1758,15 @@ gui_window_remove_caret(struct gui_window *g)
}
}
+static void framebuffer_window_reformat(struct gui_window *gw)
+{
+ /** @todo if we ever do zooming reformat should be implemented */
+ LOG(("window:%p", gw));
+
+ /*
+ browser_window_reformat(gw->bw, false, width, height);
+ */
+}
static struct gui_window_table framebuffer_window_table = {
.create = gui_window_create,
@@ -1772,6 +1777,7 @@ static struct gui_window_table framebuffer_window_table = {
.set_scroll = gui_window_set_scroll,
.get_dimensions = gui_window_get_dimensions,
.update_extent = gui_window_update_extent,
+ .reformat = framebuffer_window_reformat,
.set_url = gui_window_set_url,
.set_status = gui_window_set_status,