aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormallum <mallum@b067294f-1dea-0310-9683-c47a78595994>2004-12-20 17:45:36 +0000
committermallum <mallum@b067294f-1dea-0310-9683-c47a78595994>2004-12-20 17:45:36 +0000
commit3d8ca97a128a5b793820acea344565df7ce019d5 (patch)
tree4830243454cbaacac80581def8695d642f65c64e /src
parentf7289363d84939dcceecbeac897074c57e690c61 (diff)
downloadmatchbox-panel-3d8ca97a128a5b793820acea344565df7ce019d5.tar.gz
matchbox-panel-3d8ca97a128a5b793820acea344565df7ce019d5.tar.bz2
matchbox-panel-3d8ca97a128a5b793820acea344565df7ce019d5.zip
16bpp pixbuf code fixups
git-svn-id: https://svn.o-hand.com/repos/matchbox/trunk/matchbox-panel@970 b067294f-1dea-0310-9683-c47a78595994
Diffstat (limited to 'src')
-rw-r--r--src/panel.c8
-rw-r--r--src/panel_menu.c21
2 files changed, 13 insertions, 16 deletions
diff --git a/src/panel.c b/src/panel.c
index 00d710a..9f7820a 100644
--- a/src/panel.c
+++ b/src/panel.c
@@ -398,10 +398,12 @@ panel_set_bg(MBPanel *panel, int bg_type, char *bg_spec)
return;
}
+ /*
DBG("%s() First pixel of root looks like %i, %i, %i, %i\n",
__func__, img_tmp->rgba[0], img_tmp->rgba[1],
img_tmp->rgba[2], img_tmp->rgba[3]);
-
+ */
+
if (trans_level > 0)
for (dx = 0; dx < panel->w; dx++)
for (dy = 0; dy < panel->h; dy++)
@@ -1718,6 +1720,10 @@ MBPanel
exit(1);
}
+ if (getenv("MB_SYNC"))
+ XSynchronize (panel->dpy, True);
+
+
panel->screen = DefaultScreen(panel->dpy);
panel->win_root = RootWindow(panel->dpy, panel->screen);
diff --git a/src/panel_menu.c b/src/panel_menu.c
index 470030c..51641d6 100644
--- a/src/panel_menu.c
+++ b/src/panel_menu.c
@@ -112,23 +112,14 @@ panel_menu_update_remove_items(MBPanel *panel)
if ((icon_data = panel_app_icon_prop_data_get(panel, papp))
!= NULL )
{
- char *p;
- int j;
-
DBG("%s() Got icon data (size: %i x %i)\n", __func__,
icon_data[0], icon_data[1] );
-
- papp->icon = mb_pixbuf_img_new(panel->pb,
- icon_data[0], icon_data[1] );
- p = papp->icon->rgba;
-
- for (j =0 ; j < (icon_data[0]*icon_data[1]); j++)
- {
- *p++ = (icon_data[j+2] >> 16) & 0xff;
- *p++ = (icon_data[j+2] >> 8) & 0xff;
- *p++ = icon_data[j+2] & 0xff;
- *p++ = icon_data[j+2] >> 24;
- }
+
+ papp->icon
+ = mb_pixbuf_img_new_from_int_data(panel->pb,
+ &icon_data[2],
+ icon_data[0],
+ icon_data[1]);
XFree(icon_data);
}