All of lore.kernel.org
 help / color / mirror / Atom feed
* [matchbox-wm][PATCH 0/3] matchbox-window-manager fixes
@ 2016-12-07 13:22 Jussi Kukkonen
  2016-12-07 13:22 ` [matchbox-wm][PATCH 1/3] ewmh: Actually set _NET_CURRENT_DESKTOP Jussi Kukkonen
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jussi Kukkonen @ 2016-12-07 13:22 UTC (permalink / raw)
  To: yocto

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(-)

-- 
2.11.0



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [matchbox-wm][PATCH 1/3] ewmh: Actually set _NET_CURRENT_DESKTOP
  2016-12-07 13:22 [matchbox-wm][PATCH 0/3] matchbox-window-manager fixes Jussi Kukkonen
@ 2016-12-07 13:22 ` Jussi Kukkonen
  2016-12-07 13:22 ` [matchbox-wm][PATCH 2/3] matchbox-remote: Fix execvp() argument Jussi Kukkonen
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Jussi Kukkonen @ 2016-12-07 13:22 UTC (permalink / raw)
  To: yocto

The property wasn't being set properly (both value and crucially
number of elements were wrong), leading to an assert in debug
chromium.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 src/ewmh.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/ewmh.c b/src/ewmh.c
index a736037..17ea48a 100644
--- a/src/ewmh.c
+++ b/src/ewmh.c
@@ -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 *)&current_desktop, 1);
 }
 
 int
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [matchbox-wm][PATCH 2/3] matchbox-remote: Fix execvp() argument
  2016-12-07 13:22 [matchbox-wm][PATCH 0/3] matchbox-window-manager fixes Jussi Kukkonen
  2016-12-07 13:22 ` [matchbox-wm][PATCH 1/3] ewmh: Actually set _NET_CURRENT_DESKTOP Jussi Kukkonen
@ 2016-12-07 13:22 ` Jussi Kukkonen
  2016-12-07 13:22 ` [matchbox-wm][PATCH 3/3] Fix "unused variable" warnings Jussi Kukkonen
  2016-12-07 14:00 ` [matchbox-wm][PATCH 0/3] matchbox-window-manager fixes Burton, Ross
  3 siblings, 0 replies; 5+ messages in thread
From: Jussi Kukkonen @ 2016-12-07 13:22 UTC (permalink / raw)
  To: yocto

The second argument is a NULL-terminated array.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 src/matchbox-remote.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/matchbox-remote.c b/src/matchbox-remote.c
index 9f62523..e6cc076 100644
--- a/src/matchbox-remote.c
+++ b/src/matchbox-remote.c
@@ -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");
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [matchbox-wm][PATCH 3/3] Fix "unused variable" warnings
  2016-12-07 13:22 [matchbox-wm][PATCH 0/3] matchbox-window-manager fixes Jussi Kukkonen
  2016-12-07 13:22 ` [matchbox-wm][PATCH 1/3] ewmh: Actually set _NET_CURRENT_DESKTOP Jussi Kukkonen
  2016-12-07 13:22 ` [matchbox-wm][PATCH 2/3] matchbox-remote: Fix execvp() argument Jussi Kukkonen
@ 2016-12-07 13:22 ` Jussi Kukkonen
  2016-12-07 14:00 ` [matchbox-wm][PATCH 0/3] matchbox-window-manager fixes Burton, Ross
  3 siblings, 0 replies; 5+ messages in thread
From: Jussi Kukkonen @ 2016-12-07 13:22 UTC (permalink / raw)
  To: yocto

Some 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.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 src/ewmh.c    | 6 ++++--
 src/mbtheme.c | 7 -------
 src/wm.c      | 2 +-
 3 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/src/ewmh.c b/src/ewmh.c
index 17ea48a..afcabe7 100644
--- a/src/ewmh.c
+++ b/src/ewmh.c
@@ -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);
diff --git a/src/mbtheme.c b/src/mbtheme.c
index 42459a0..821195a 100644
--- a/src/mbtheme.c
+++ b/src/mbtheme.c
@@ -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);
 
diff --git a/src/wm.c b/src/wm.c
index cb033c6..0823fef 100644
--- a/src/wm.c
+++ b/src/wm.c
@@ -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 */
 
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [matchbox-wm][PATCH 0/3] matchbox-window-manager fixes
  2016-12-07 13:22 [matchbox-wm][PATCH 0/3] matchbox-window-manager fixes Jussi Kukkonen
                   ` (2 preceding siblings ...)
  2016-12-07 13:22 ` [matchbox-wm][PATCH 3/3] Fix "unused variable" warnings Jussi Kukkonen
@ 2016-12-07 14:00 ` Burton, Ross
  3 siblings, 0 replies; 5+ messages in thread
From: Burton, Ross @ 2016-12-07 14:00 UTC (permalink / raw)
  To: Jussi Kukkonen; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 188 bytes --]

On 7 December 2016 at 13:22, Jussi Kukkonen <jussi.kukkonen@intel.com>
wrote:

> One actual bug fix (YOCTO #10635) and a few build cleanups.
>

Looks good to me, push away.

Ross

[-- Attachment #2: Type: text/html, Size: 598 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-12-07 14:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-07 13:22 [matchbox-wm][PATCH 0/3] matchbox-window-manager fixes Jussi Kukkonen
2016-12-07 13:22 ` [matchbox-wm][PATCH 1/3] ewmh: Actually set _NET_CURRENT_DESKTOP Jussi Kukkonen
2016-12-07 13:22 ` [matchbox-wm][PATCH 2/3] matchbox-remote: Fix execvp() argument Jussi Kukkonen
2016-12-07 13:22 ` [matchbox-wm][PATCH 3/3] Fix "unused variable" warnings Jussi Kukkonen
2016-12-07 14:00 ` [matchbox-wm][PATCH 0/3] matchbox-window-manager fixes Burton, Ross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.