Re: [PATCH] wmaker: Restore multi screen functionality by reverting wrong commits

2014-11-06 Thread Rodolfo García Peñas (kix)

Hello,

please, how can I reproduce the problem?

Thanks a lot,
Rodolfo.

BALATON Zoltan bala...@eik.bme.hu escribió:


Revert patches that moved variables from WMScreen to global level
because this broke X displays with multiple independent screens and
caused dock and clip icons to become mixed up. When managing multiple
screens each screen used to have it's own state/dock and clip. This
commit restores that by reverting mainly the commits listed below (and
those that are invalidated by reverting these) and fixing up later
commits to apply after the revert.

Reverted commits:
f60e65001bfdd21fd9939b2b0121037682b6522c Moved 'workspace_name_font'  
from the Screen to a Workspace object in the global namespace
9e103a46e99d323e070c3779c5d261c171df2e17 Variable workspace_count  
moved to the workspace object in the global namespace
e5ae684d02fdb66f1a90d486a21fd70498464f90 Variable last_workspace  
moved to workspace object in global namespace
c610b8d7ce865938a7a5e2aa97772f2a67f30602 Variable current_workspace  
moved to workspace object in global namespace
f0c50736001dd8c5a81ab1ae5926f6e14b7a9730 Array of workspaces moved  
to the workspace object in the global namespace
9c252988f8378876b9710561428666799317673c Variable workspace_menu  
moved to workspace object in global namespace
e86b8dcb2f28bf06ff04e12ea15754b684437f31 Clip, Dock and Drawers menu  
moved to appropriate global namespace

074092f319706bfe3f4df8873aab962ece25e9c3 Removed WScreen args not used
4a7daf2322901ca43b5cea2cab26015394db5b95 AppIcon list moved out of WScreen
2103fe390b839c2eea6a288539c5bd1c43435ac7 Variable clip_icon moved to  
clip object in the global namespace
014bc52531ec5d554920ce82d3e1046e26f84a3b wClipIconPaint appicon  
argument removed
40e1ea08b86a9d77488f451588581bacb794fdb2 Varible session_state moved  
to global namespace

6987d4aa4041f17f31e05d677326b42b01f946de Removed WScreen argument
0de3e590cedeb441d7c5038b8fae26bf851c5fd8 shortcutWindows moved to w_global
2e64831fb6742d8fc4164000da9acae4738853a8 Removed unused variable wapp_list
b6423a7b4f0111f73690d2a99ca0433d30b5dd32 wmaker: Moved variable  
Screen Count into the global namespace

---
 src/WindowMaker.h |  52 ++--
 src/actions.c |  56 ++---
 src/appicon.c |  60 ++---
 src/application.c |  17 +++-
 src/balloon.c |   6 +-
 src/cycling.c |   2 +-
 src/defaults.c|  32 +++
 src/defaults.h|   2 +-
 src/dock.c| 198 ++-
 src/dock.h|   6 +-
 src/dockedapp.c   |   4 +-
 src/event.c   |  59 ++---
 src/main.c|   2 +-
 src/menu.c|  13 +--
 src/misc.c|   2 +-
 src/moveres.c |  40 -
 src/placement.c   |   6 +-
 src/rootmenu.c|  12 +--
 src/screen.c  |  37 -
 src/screen.h  |  29 +++
 src/session.c |  67 ---
 src/session.h |   2 +-
 src/startup.c |  12 +--
 src/switchmenu.c  |   6 +-
 src/switchpanel.c |   2 +-
 src/wdefaults.c   |   4 +-
 src/window.c  |  63 +++---
 src/winmenu.c |  65 ---
 src/winspector.c  |  17 ++--
 src/wmspec.c  |  36 
 src/workspace.c   | 245  
+++---

 src/workspace.h   |   6 +-
 src/xdnd.c|   2 +-
 33 files changed, 589 insertions(+), 573 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 92e1ba6..82188bd 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -511,43 +511,12 @@ extern struct wmaker_global_variables {
/* Screens related */
int screen_count;

-   /* Workspace related */
-   struct {
-   struct WWorkspace **array;  /* data for the workspaces */
-
-   int count;  /* number of workspaces */
-   int current;/* current workspace number */
-   int last_used;  /* last used workspace number */
-
-   WMFont *font_for_name;  /* used during workspace switch */
-
-   /*
-* Ignore Workspace Change:
-* this variable is used to prevent workspace switch while 
certain
-* operations are ongoing.
-*/
-   Bool ignore_change;
-
-   /* Menus */
-   struct WMenu *menu; /* workspace operation */
-   struct WMenu *submenu;  /* workspace list for window_menu */
-   } workspace;
-
-   /* Clip related */
-   struct {
-		struct WAppIcon *icon;	/* The clip main icon, or the dock's, if  
they are merged */

-
-   struct WMenu *menu; /* Menu for clips */
-   struct WMenu *submenu;  /* Workspace list for clips */
-   struct WMenu *opt_menu; /* Options for Clip */
-   struct WMenu *ws_menu;  /* workspace menu for clip */
-   } clip;
-
-   /* Dock related */
-   struct {
-   struct WMenu *pos_menu; /* menu for position of the 

Re: [PATCH] wmaker: Restore multi screen functionality by reverting wrong commits

2014-11-06 Thread BALATON Zoltan

On Thu, 6 Nov 2014, Rodolfo García Peñas (kix) wrote:

please, how can I reproduce the problem?


- attach appicons to the dock and clip
- connect a second display and configure X to handle them as separate 
screens (such as display :0.0 and :0.1)


The screens in this config are separate (and may have different visual 
settings too) so it is not possible to share a single WScreen between them 
as that causes mixup of objects on separate screens.


Regards,
BALATON Zoltan

[PATCH] wmaker: Restore multi screen functionality by reverting wrong commits

2014-10-19 Thread BALATON Zoltan
Revert patches that moved variables from WMScreen to global level
because this broke X displays with multiple independent screens and
caused dock and clip icons to become mixed up. When managing multiple
screens each screen used to have it's own state/dock and clip. This
commit restores that by reverting mainly the commits listed below (and
those that are invalidated by reverting these) and fixing up later
commits to apply after the revert.

Reverted commits:
f60e65001bfdd21fd9939b2b0121037682b6522c Moved 'workspace_name_font' from the 
Screen to a Workspace object in the global namespace
9e103a46e99d323e070c3779c5d261c171df2e17 Variable workspace_count moved to the 
workspace object in the global namespace
e5ae684d02fdb66f1a90d486a21fd70498464f90 Variable last_workspace moved to 
workspace object in global namespace
c610b8d7ce865938a7a5e2aa97772f2a67f30602 Variable current_workspace moved to 
workspace object in global namespace
f0c50736001dd8c5a81ab1ae5926f6e14b7a9730 Array of workspaces moved to the 
workspace object in the global namespace
9c252988f8378876b9710561428666799317673c Variable workspace_menu moved to 
workspace object in global namespace
e86b8dcb2f28bf06ff04e12ea15754b684437f31 Clip, Dock and Drawers menu moved to 
appropriate global namespace
074092f319706bfe3f4df8873aab962ece25e9c3 Removed WScreen args not used
4a7daf2322901ca43b5cea2cab26015394db5b95 AppIcon list moved out of WScreen
2103fe390b839c2eea6a288539c5bd1c43435ac7 Variable clip_icon moved to clip 
object in the global namespace
014bc52531ec5d554920ce82d3e1046e26f84a3b wClipIconPaint appicon argument removed
40e1ea08b86a9d77488f451588581bacb794fdb2 Varible session_state moved to global 
namespace
6987d4aa4041f17f31e05d677326b42b01f946de Removed WScreen argument
0de3e590cedeb441d7c5038b8fae26bf851c5fd8 shortcutWindows moved to w_global
2e64831fb6742d8fc4164000da9acae4738853a8 Removed unused variable wapp_list
b6423a7b4f0111f73690d2a99ca0433d30b5dd32 wmaker: Moved variable Screen Count 
into the global namespace
---
 src/WindowMaker.h |  52 ++--
 src/actions.c |  56 ++---
 src/appicon.c |  60 ++---
 src/application.c |  17 +++-
 src/balloon.c |   6 +-
 src/cycling.c |   2 +-
 src/defaults.c|  32 +++
 src/defaults.h|   2 +-
 src/dock.c| 198 ++-
 src/dock.h|   6 +-
 src/dockedapp.c   |   4 +-
 src/event.c   |  59 ++---
 src/main.c|   2 +-
 src/menu.c|  13 +--
 src/misc.c|   2 +-
 src/moveres.c |  40 -
 src/placement.c   |   6 +-
 src/rootmenu.c|  12 +--
 src/screen.c  |  37 -
 src/screen.h  |  29 +++
 src/session.c |  67 ---
 src/session.h |   2 +-
 src/startup.c |  12 +--
 src/switchmenu.c  |   6 +-
 src/switchpanel.c |   2 +-
 src/wdefaults.c   |   4 +-
 src/window.c  |  63 +++---
 src/winmenu.c |  65 ---
 src/winspector.c  |  17 ++--
 src/wmspec.c  |  36 
 src/workspace.c   | 245 +++---
 src/workspace.h   |   6 +-
 src/xdnd.c|   2 +-
 33 files changed, 589 insertions(+), 573 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 92e1ba6..82188bd 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -511,43 +511,12 @@ extern struct wmaker_global_variables {
/* Screens related */
int screen_count;
 
-   /* Workspace related */
-   struct {
-   struct WWorkspace **array;  /* data for the workspaces */
-
-   int count;  /* number of workspaces */
-   int current;/* current workspace number */
-   int last_used;  /* last used workspace number */
-
-   WMFont *font_for_name;  /* used during workspace switch */
-
-   /*
-* Ignore Workspace Change:
-* this variable is used to prevent workspace switch while 
certain
-* operations are ongoing.
-*/
-   Bool ignore_change;
-
-   /* Menus */
-   struct WMenu *menu; /* workspace operation */
-   struct WMenu *submenu;  /* workspace list for window_menu */
-   } workspace;
-
-   /* Clip related */
-   struct {
-   struct WAppIcon *icon;  /* The clip main icon, or the dock's, 
if they are merged */
-
-   struct WMenu *menu; /* Menu for clips */
-   struct WMenu *submenu;  /* Workspace list for clips */
-   struct WMenu *opt_menu; /* Options for Clip */
-   struct WMenu *ws_menu;  /* workspace menu for clip */
-   } clip;
-
-   /* Dock related */
-   struct {
-   struct WMenu *pos_menu; /* menu for position of the dock */
-   struct WMenu *drawer_menu;  /* menu for the drawers */
-   } dock;
+   /*
+* Ignore