r5329 vince - in /branches/vince/netsurf-fb/framebuffer: fb_16bpp_plotters.c fb_32bpp_plotters.c fb_init_linux.c

netsurf at semichrome.net netsurf at semichrome.net
Mon Sep 15 21:13:33 BST 2008


Author: vince
Date: Mon Sep 15 15:13:33 2008
New Revision: 5329

URL: http://source.netsurf-browser.org?rev=5329&view=rev
Log:
improve text clipping

Modified:
    branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c
    branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c
    branches/vince/netsurf-fb/framebuffer/fb_init_linux.c

Modified: branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c?rev=5329&r1=5328&r2=5329&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c Mon Sep 15 15:13:33 2008
@@ -221,7 +221,10 @@
 
 	char *buffer = NULL;
 
-        if (y > fb_plot_ctx.y1)
+        /* y is given to the fonts baseline we need it to the fonts top */
+        y-=(fb_font->height * 75)/100;
+
+        if (y + fb_font->height > fb_plot_ctx.y1)
                 return true;
 
         if (x > fb_plot_ctx.x1)
@@ -239,8 +242,6 @@
 
         length = strlen(buffer);
 
-        /* y is given to the fonts baseline we need it to the fonts top */
-        y-=(fb_font->height * 75)/100;
 
         fgcol = ((c & 0xF8) << 8) |
               ((c & 0xFC00 ) >> 5) |

Modified: branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c?rev=5329&r1=5328&r2=5329&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c Mon Sep 15 15:13:33 2008
@@ -117,6 +117,12 @@
 
 	char *buffer = NULL;
 
+        /* y is given to the fonts baseline we need it to the fonts top */
+        y-=(fb_font->height * 75)/100;
+
+        if (y + fb_font->height > fb_plot_ctx.y1)
+                return true;
+
         if (y > fb_plot_ctx.y1)
                 return true;
 
@@ -134,9 +140,6 @@
                 return true;
 
         length = strlen(buffer);
-
-        /* y is given to the fonts baseline we need it to the fonts top */
-        y-=(fb_font->height * 75)/100;
 
         fgcol = ((c & 0xFF) << 16) | 
                 ((c & 0xFF00)) | 

Modified: branches/vince/netsurf-fb/framebuffer/fb_init_linux.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_init_linux.c?rev=5329&r1=5328&r2=5329&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_init_linux.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_init_linux.c Mon Sep 15 15:13:33 2008
@@ -519,12 +519,10 @@
 
 
 
-        inputfd = open("/dev/input/event0", O_RDONLY);
+        inputfd = open("/dev/input/event0", O_RDONLY | O_NONBLOCK);
         if (inputfd < 0) {
                 fprintf(stderr, "Unable to open /dev/input/event0 no keyboard\n");                
-        } else {
-                fcntl(0, F_SETFL, O_NONBLOCK);
-        }
+        } 
         return newfb;
 }
 
@@ -538,7 +536,7 @@
         ssize_t amt;
         struct input_event event;       
 
-        if(inputfd < 0)
+        if (inputfd < 0)
                 return;
 
         amt = read(inputfd, &event, sizeof(struct input_event));




More information about the netsurf-commits mailing list