matchbox-window-manager fixes
cover matchbox-window-manager fixes
One actual bug fix (YOCTO #10635) and a few build cleanups.
Thanks,
Jussi
The following changes since commit 9fd1806dfa7c8f2202db18b7bc880857a3019f8c:
Bump version, update bug-report URI (2016-06-02 14:46:42 +0300)
are available in the git repository at:
git://github.com/jku/matchbox-window-manager net-current-desktop
https://github.com/jku/matchbox-window-manager/tree/net-current-desktop
Jussi Kukkonen (3):
ewmh: Actually set _NET_CURRENT_DESKTOP
matchbox-remote: Fix execvp() argument
Fix "unused variable" warnings
src/ewmh.c | 11 +++++++---- src/matchbox-remote.c | 4 +++- src/mbtheme.c | 7 ------- src/wm.c | 2 +- 4 files changed, 11 insertions(+), 13 deletions(-)
Signature · 1 line
2.11.0
PATCH 1/3 ewmh: Actually set _NET_CURRENT_DESKTOP
The property wasn't being set properly (both value and crucially number of elements were wrong), leading to an assert in debug chromium.
--- src/ewmh.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
src/ewmh.c +3 -2
@@ -137,7 +137,8 @@ void ewmh_init_props(Wm *w) {long num_desktops =1 ; - +long current_desktop =0 ; +set_compliant (w);set_supported (w);
@@ -147,7 +148,7 @@ ewmh_init_props(Wm *w)XChangeProperty (w->dpy, w->root, w->atoms[_NET_CURRENT_DESKTOP],XA_CARDINAL ,32 , PropModeReplace, - (unsigned char *)&num_desktops,0 ); + (unsigned char *)¤t_desktop,1 ); }int
Signature · 1 line
2.11.0
PATCH 2/3 matchbox-remote: Fix execvp() argument
The second argument is a NULL-terminated array.
--- src/matchbox-remote.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
src/matchbox-remote.c +3 -1
@@ -143,11 +143,13 @@ mbcommand(int cmd_id, char *data) {/* Check if desktop is running */ if (!XGetSelectionOwner (dpy, desktop_manager_atom)) { +char *exec_args[] = {NULL }; +fprintf (stderr,"Desktop not running, exiting...\n" );switch (fork ()) {case 0 : -execvp ("mbdesktop" ,NULL ); +execvp ("mbdesktop" , exec_args);break ;case -1 :fprintf (stderr,"failed to exec mbdesktop" );
Signature · 1 line
2.11.0
PATCH 3/3 Fix "unused variable" warnings
In reply to Jussi KukkonenSome were removed as unused, some just silenced with the gcc attribute since they were actually somehow used and fixing otherwise would have been more invasive.
--- src/ewmh.c | 6 ++++-- src/mbtheme.c | 7 ------- src/wm.c | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-)
src/ewmh.c +4 -2
@@ -1257,8 +1257,9 @@ int ewmh_utf8_len(unsigned char *str) /* Only parse _validated_ utf8 */ {unsigned char *p = str; +int len, result =0 ; + __attribute__((unused))int mask; -int mask, len, result =0 ;while (*p !='\0' ) {UTF8_COMPUTE (*p, mask, len);
@@ -1273,8 +1274,9 @@ int ewmh_utf8_get_byte_cnt(unsigned char *str, int num_chars) {unsigned char *p = str; +int len, result =0 ; + __attribute__((unused))int mask; -int mask, len, result =0 ;while (*p !='\0' && num_chars-- >0 ) {UTF8_COMPUTE (*p, mask, len);
src/mbtheme.c +0 -7
@@ -602,7 +602,6 @@ theme_frame_paint( MBTheme *theme,MBThemeFrame *frame;MBPixbufImage *img;MBThemeLayer *layer_label =NULL , *layer_icon =NULL ; -struct list_item *layer_list_item;int label_rendered_width;int decor_idx =0 ;MBDrawable *drawable =NULL ;
@@ -699,8 +698,6 @@ theme_frame_paint( MBTheme *theme, img = theme->img_caches[frame_type]; } - layer_list_item = frame->layers; - layer_label = (MBThemeLayer *)list_find_by_id (frame->layers,LAYER_LABEL );/* Figure out text alignment + positioning */
@@ -981,7 +978,6 @@ theme_frame_menu_highlight_entry(Client *c,MBDrawable *drw;MBThemeFrame *frame;MBFont *font; -MBColor *color;Client *entry = (Client *)button->data;int offset, item_h;
@@ -991,7 +987,6 @@ theme_frame_menu_highlight_entry(Client *c,return ; font = frame->font; - color = frame->color;if (frame->hl_color) {
@@ -1982,7 +1977,6 @@ parse_color_tag (MBTheme *theme, XMLNode *node) {MBColor *color =NULL ; -int alpha;char *id =get_attr (node,"id" );char *spec =get_attr (node,"def" );
@@ -1990,7 +1984,6 @@ parse_color_tag (MBTheme *theme, {fprintf (stderr,"matchbox *warning*: alpha attribute in theme.xml color tar is depreciated\n Use def='rrggbbaa' format instead to specify alpha\n" ); } - else alpha = 0xff;dbg ("%s() id : %s , def : %s\n" , __func__, id, spec);
src/wm.c +1 -1
@@ -2621,7 +2621,7 @@ wm_activate_client(Client *c)/* As matchbox works around 'main' windows ( apps/main and desktop wins). We need to sync extra stuff up when displaying a new one. */ -Bool switching_from_to_fullscreen = False; + __attribute__((unused))Bool switching_from_to_fullscreen = False;/* save focus state for transient dialogs of prev showing main win */
Signature · 1 line
2.11.0
Quoted 2 lines · Jussi Kukkonen
One actual bug fix (YOCTO #10635) and a few build cleanups.
Looks good to me, push away.
Ross