application icons, again

2014-08-23 Thread Yury Tarasievich

Hi all,

On a fairly recent 64-bit system (slackware 
14.1) a couple of 32-bit apps do not show their 
application icons: Thunderbird and Firefox, also 
the FF's addon DownThemAll which works in a 
separate window. For DownThemAll I don't think 
there's even a separate icon file.


This problem is definitely related to the system 
(Xorg?) version. There was no such problem on ~2 
yrs old 64-bit system (slackware 13.37) which 
sits on a neighbouring partition (my homedir is 
shared).


In .xsession-errors there are some messages 
about X errors, catched in WindowMaker.
I have cleared the icons cache, FWIW. 
WindowMaker is at #next.


Yury


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


[repo.or.cz] wmaker-crm.git branch next updated: wmaker-0.95.5-517-g238b8ed3

2014-08-23 Thread crmafra
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.

The branch, next has been updated
   via  238b8ed3ca301ee027e11fe5b7dbd3627d61f265 (commit)
  from  adebdf41c6ff33648fd884599e35b20a448500cc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
http://repo.or.cz/w/wmaker-crm.git/commit/238b8ed3ca301ee027e11fe5b7dbd3627d61f265

commit 238b8ed3ca301ee027e11fe5b7dbd3627d61f265
Author: David Maciejak 
Date:   Sun Aug 24 08:55:59 2014 +0800

WINGs: merge duplicate code from wtext

This patch is saving about 30 duplicate code lines from
WMPrependTextBlock and WMAppendTextBlock to create
a static fct called prepareTextBlock.

diff --git a/WINGs/wtext.c b/WINGs/wtext.c
index 734dc8bc..5981de38 100644
--- a/WINGs/wtext.c
+++ b/WINGs/wtext.c
@@ -3322,13 +3322,8 @@ WMGetTextBlockProperties(WMText * tPtr, void *vtb, 
unsigned int *first,
*margins = tPtr->margins[tb->marginN];
 }
 
-void WMPrependTextBlock(WMText * tPtr, void *vtb)
+static int prepareTextBlock(WMText *tPtr, TextBlock *tb)
 {
-   TextBlock *tb = (TextBlock *) vtb;
-
-   if (!tb)
-   return;
-
if (tb->graphic) {
if (tb->object) {
WMWidget *w = tb->d.widget;
@@ -3348,13 +3343,24 @@ void WMPrependTextBlock(WMText * tPtr, void *vtb)
tb->next = tb->prior = NULL;
tb->first = True;
tPtr->lastTextBlock = tPtr->firstTextBlock = 
tPtr->currentTextBlock = tb;
-   return;
+   return 0;
}
 
if (!tb->first) {
tb->marginN = tPtr->currentTextBlock->marginN;
}
 
+   return 1;
+}
+
+
+void WMPrependTextBlock(WMText *tPtr, void *vtb)
+{
+   TextBlock *tb = (TextBlock *) vtb;
+
+   if (!tb || !prepareTextBlock(tPtr, tb))
+   return;
+
tb->next = tPtr->currentTextBlock;
tb->prior = tPtr->currentTextBlock->prior;
if (tPtr->currentTextBlock->prior)
@@ -3367,39 +3373,13 @@ void WMPrependTextBlock(WMText * tPtr, void *vtb)
tPtr->currentTextBlock = tb;
 }
 
-void WMAppendTextBlock(WMText * tPtr, void *vtb)
+void WMAppendTextBlock(WMText *tPtr, void *vtb)
 {
TextBlock *tb = (TextBlock *) vtb;
 
-   if (!tb)
+   if (!tb || !prepareTextBlock(tPtr, tb))
return;
 
-   if (tb->graphic) {
-   if (tb->object) {
-   WMWidget *w = tb->d.widget;
-   if (W_CLASS(w) != WC_TextField && W_CLASS(w) != 
WC_Text) {
-   (W_VIEW(w))->attribs.cursor = 
tPtr->view->screen->defaultCursor;
-   (W_VIEW(w))->attribFlags |= CWOverrideRedirect 
| CWCursor;
-   }
-   }
-   WMAddToArray(tPtr->gfxItems, (void *)tb);
-   tPtr->tpos = 1;
-
-   } else {
-   tPtr->tpos = tb->used;
-   }
-
-   if (!tPtr->lastTextBlock || !tPtr->firstTextBlock) {
-   tb->next = tb->prior = NULL;
-   tb->first = True;
-   tPtr->lastTextBlock = tPtr->firstTextBlock = 
tPtr->currentTextBlock = tb;
-   return;
-   }
-
-   if (!tb->first) {
-   tb->marginN = tPtr->currentTextBlock->marginN;
-   }
-
tb->next = tPtr->currentTextBlock->next;
tb->prior = tPtr->currentTextBlock;
if (tPtr->currentTextBlock->next)

---

Summary of changes:
 WINGs/wtext.c |   50 +++---
 1 files changed, 15 insertions(+), 35 deletions(-)


repo.or.cz automatic notification. Contact project admin crma...@gmail.com
if you want to unsubscribe, or site admin ad...@repo.or.cz if you receive
no reply.
-- 
wmaker-crm.git ("The Window Maker window manager")


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: Could we remove this code?

2014-08-23 Thread Carlos R. Mafra
On Sat, 23 Aug 2014 at 22:12:39 +, Rodolfo García Peñas (kix) wrote:
> 
> is possible remove this code? I did it and no differences :-/

I think there are two options:

1. If you can prove that the code is never executed you can safely remove it

2. If the code can be executed, you can explain what it's supposed to do
   and argue why wmaker doesn't really need to do that.
   
I like to get rid of code in general, so I'm open to hear explanations
of why we don't need that code. If it makes sense and people agree,
we can remove it.


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


[PATCH] WINGs: merge duplicate code from wtext

2014-08-23 Thread David Maciejak
This patch is saving about 30 duplicate code lines from
WMPrependTextBlock and WMAppendTextBlock to create
a static fct called prepareTextBlock.

---
 WINGs/wtext.c | 50 +++---
 1 file changed, 15 insertions(+), 35 deletions(-)

diff --git a/WINGs/wtext.c b/WINGs/wtext.c
index 734dc8b..5981de3 100644
--- a/WINGs/wtext.c
+++ b/WINGs/wtext.c
@@ -3322,13 +3322,8 @@ WMGetTextBlockProperties(WMText * tPtr, void
*vtb, unsigned int *first,
  *margins = tPtr->margins[tb->marginN];
 }

-void WMPrependTextBlock(WMText * tPtr, void *vtb)
+static int prepareTextBlock(WMText *tPtr, TextBlock *tb)
 {
- TextBlock *tb = (TextBlock *) vtb;
-
- if (!tb)
- return;
-
  if (tb->graphic) {
  if (tb->object) {
  WMWidget *w = tb->d.widget;
@@ -3348,13 +3343,24 @@ void WMPrependTextBlock(WMText * tPtr, void *vtb)
  tb->next = tb->prior = NULL;
  tb->first = True;
  tPtr->lastTextBlock = tPtr->firstTextBlock = tPtr->currentTextBlock = tb;
- return;
+ return 0;
  }

  if (!tb->first) {
  tb->marginN = tPtr->currentTextBlock->marginN;
  }

+ return 1;
+}
+
+
+void WMPrependTextBlock(WMText *tPtr, void *vtb)
+{
+ TextBlock *tb = (TextBlock *) vtb;
+
+ if (!tb || !prepareTextBlock(tPtr, tb))
+ return;
+
  tb->next = tPtr->currentTextBlock;
  tb->prior = tPtr->currentTextBlock->prior;
  if (tPtr->currentTextBlock->prior)
@@ -3367,39 +3373,13 @@ void WMPrependTextBlock(WMText * tPtr, void *vtb)
  tPtr->currentTextBlock = tb;
 }

-void WMAppendTextBlock(WMText * tPtr, void *vtb)
+void WMAppendTextBlock(WMText *tPtr, void *vtb)
 {
  TextBlock *tb = (TextBlock *) vtb;

- if (!tb)
+ if (!tb || !prepareTextBlock(tPtr, tb))
  return;

- if (tb->graphic) {
- if (tb->object) {
- WMWidget *w = tb->d.widget;
- if (W_CLASS(w) != WC_TextField && W_CLASS(w) != WC_Text) {
- (W_VIEW(w))->attribs.cursor = tPtr->view->screen->defaultCursor;
- (W_VIEW(w))->attribFlags |= CWOverrideRedirect | CWCursor;
- }
- }
- WMAddToArray(tPtr->gfxItems, (void *)tb);
- tPtr->tpos = 1;
-
- } else {
- tPtr->tpos = tb->used;
- }
-
- if (!tPtr->lastTextBlock || !tPtr->firstTextBlock) {
- tb->next = tb->prior = NULL;
- tb->first = True;
- tPtr->lastTextBlock = tPtr->firstTextBlock = tPtr->currentTextBlock = tb;
- return;
- }
-
- if (!tb->first) {
- tb->marginN = tPtr->currentTextBlock->marginN;
- }
-
  tb->next = tPtr->currentTextBlock->next;
  tb->prior = tPtr->currentTextBlock;
  if (tPtr->currentTextBlock->next)
--


0001-WINGs-merge-duplicate-code-from-wtext.patch
Description: Binary data


Could we remove this code?

2014-08-23 Thread Rodolfo García Peñas (kix)

Hi,

is possible remove this code? I did it and no differences :-/

Cheers,
kix


kix@kentin:~/src/wmaker-crm$ git diff
diff --git a/src/dock.c b/src/dock.c
index e837280..2f394d7 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -3250,29 +3250,6 @@ void wDockTrackWindowLaunch(WDock *dock, Window window)
icon->main_window = window;
}
found = True;
-   if (!wPreferences.no_animations && !icon->launching &&
-   !dock->screen_ptr->flags.startup &&
!dock->collapsed) {
-   WAppIcon *aicon;
-   int x0, y0;
-
-   icon->launching = 1;
-   dockIconPaint(icon);
-
-   aicon =
wAppIconCreateForDock(dock->screen_ptr, NULL,
-
wm_instance, wm_class, TILE_NORMAL);
-   /* XXX: can: aicon->icon == NULL ? */
-   PlaceIcon(dock->screen_ptr, &x0, &y0,
wGetHeadForWindow(aicon->icon->owner));
-   wAppIconMove(aicon, x0, y0);
-   /* Should this always be lowered? -Dan */
-   if (dock->lowered)
-   wLowerFrame(aicon->icon->core);
-   XMapWindow(dpy, aicon->icon->core->window);
-   aicon->launching = 1;
-   wAppIconPaint(aicon);
-   SlideWindow(aicon->icon->core->window,
x0, y0, icon->x_pos, icon->y_pos);
-   XUnmapWindow(dpy, aicon->icon->core->window);
-   wAppIconDestroy(aicon);
-   }
wDockFinishLaunch(icon);
break;
}
kix@kentin:~/src/wmaker-crm$
Rodolfo García Peñas (kix)
http://www.kix.es/


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


application icons

2014-08-23 Thread Yury Tarasievich

Hi all,

The application icon and the related application 
miniwindow icon have to be set separately (if 
windowmaker can't retrieve the icon from the 
running app itself). Is this an intended behaviour?


Yury


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: Problem with stacking

2014-08-23 Thread Rodolfo García Peñas (kix)


David Maciejak  escribió:


Hi,

I also stumbled upon the same issue (I put the old email in reference
below) and dug into it these last days.

Rodolfo, as you were the original reporter.
Could you please check the patch enclosed ?


thanks!
david


Hi David,

you made my day :-)

Patch is perfect.

Thanks a lot,
Rodolfo.




From e1e12067794c4e53064e59edc3de7af196179369 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= 
Date: Sat, 23 Jun 2012 15:21:24 +0200
Subject: [PATCH] Test environment

Hi,

we have a bug with stacking. If you check your logfile
(~/.xsessions-errors) or the console y you are not using a visual
login program (xdm, kdm, gdm,...), you will find something like:

wmaker(catchXError(startup.c:177)): warning: internal X error:
RenderBadPicture (invalid Picture parameter)
Request code: 152
Request minor code: 7
Resource ID: 0x6000a4
Error serial: 9269

This output is created when you deminiaturize a window using
double-click. Yes, try now! :-)

I spent some time on this problem, but I cannot solve it. I saw an
interesting thing. When you minimize the window and then deminiaturize
with double click you get the problem. But, if you minimize the window
and then deminiaturize it with rigth click on the icon, and then click
on deminiaturize, then you don't get the error.

Ok, I continue checking the problem, and I created a "Testing
enviroment patch" (attached). With this patch, I got this output:

--win 0x1a12dd0--
1
2
5
wmaker(catchXError(startup.c:177)): warning: internal X error:
RenderBadPicture (invalid Picture parameter)
Request code: 152
Request minor code: 7
Resource ID: 0x6000a4
Error serial: 9269

--win 0x1a499b0--
-.win 0x1a12dd0.-
2
5
-.win 0x1a12dd0.-


When I deminiaturize the icon using double click, then "if
(frame->stacking->under)" is true, but using the miniwindow menu, the
flow is different, and it don't exec the stacking line
"frame->stacking->under->stacking->above = frame->stacking->above;".

The question is easy, why the "frame->stacking->under" exists if I did
double click?

Finally, if you see the lines above and below the call to
wDeiconifyWindow (printf("--win %p--\n" and printf("-.win %p.-\n", the
WWindow address is the same using the menu and different using double
click.

Any help is appreciated.

Best Regars,
kix.



Rodolfo García Peñas (kix)
http://www.kix.es/


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


re: Problem with stacking

2014-08-23 Thread David Maciejak
Hi,

I also stumbled upon the same issue (I put the old email in reference
below) and dug into it these last days.

Rodolfo, as you were the original reporter.
Could you please check the patch enclosed ?


thanks!
david


>From e1e12067794c4e53064e59edc3de7af196179369 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= 
Date: Sat, 23 Jun 2012 15:21:24 +0200
Subject: [PATCH] Test environment

Hi,

we have a bug with stacking. If you check your logfile
(~/.xsessions-errors) or the console y you are not using a visual
login program (xdm, kdm, gdm,...), you will find something like:

wmaker(catchXError(startup.c:177)): warning: internal X error:
RenderBadPicture (invalid Picture parameter)
Request code: 152
Request minor code: 7
Resource ID: 0x6000a4
Error serial: 9269

This output is created when you deminiaturize a window using
double-click. Yes, try now! :-)

I spent some time on this problem, but I cannot solve it. I saw an
interesting thing. When you minimize the window and then deminiaturize
with double click you get the problem. But, if you minimize the window
and then deminiaturize it with rigth click on the icon, and then click
on deminiaturize, then you don't get the error.

Ok, I continue checking the problem, and I created a "Testing
enviroment patch" (attached). With this patch, I got this output:

--win 0x1a12dd0--
1
2
5
wmaker(catchXError(startup.c:177)): warning: internal X error:
RenderBadPicture (invalid Picture parameter)
Request code: 152
Request minor code: 7
Resource ID: 0x6000a4
Error serial: 9269

--win 0x1a499b0--
-.win 0x1a12dd0.-
2
5
-.win 0x1a12dd0.-


When I deminiaturize the icon using double click, then "if
(frame->stacking->under)" is true, but using the miniwindow menu, the
flow is different, and it don't exec the stacking line
"frame->stacking->under->stacking->above = frame->stacking->above;".

The question is easy, why the "frame->stacking->under" exists if I did
double click?

Finally, if you see the lines above and below the call to
wDeiconifyWindow (printf("--win %p--\n" and printf("-.win %p.-\n", the
WWindow address is the same using the menu and different using double
click.

Any help is appreciated.

Best Regars,
kix.


0001-wmaker-fix-deiconify-window-on-double-click.patch
Description: Binary data