Re: FVWM: Force restore of titles and borders on Gnome applications

2015-06-10 Thread Dov Grobgeld
Indeed my patch is unnecessary and the same functionality may be
achieved by the following line in .fvwmrc

Style gthumb !MwmFunctions

According to the change log NoFuncHint was the old name of the
parameter. There are still references to NoFuncHint though in the
documentation, that should be fixed.

Thanks!
Dov


On Tue, Jun 9, 2015 at 2:39 PM, Dov Grobgeld dov.grobg...@gmail.com wrote:
 On Tue, Jun 9, 2015 at 11:43 AM, Thomas Adam tho...@fvwm.org wrote:
 I'm not sure the entire patch is necessary.  What's wrong with using
 NoFuncHint?

 I wasn't aware of it. Indeed the documentation states exactly the same
 functionality as I wanted to implement. Unfortunately, I can't get it
 to work. I.e. With my patch and with

Style evince MwmHintsIgnore

 in .fvwmrc, the frame is shown. But without my patch and with:

Style evince NoFuncHint

 in .fvwmrc, the frame is not shown. Is this a bug, or am I doing
 something wrong?

 Regards,
 Dov


 -- Thomas Adam



Re: FVWM: Force restore of titles and borders on Gnome applications

2015-06-10 Thread Ethan Grammatikidis
On Tue, 9 Jun 2015 14:39:05 +0300
Dov Grobgeld dov.grobg...@gmail.com wrote:

 On Tue, Jun 9, 2015 at 11:43 AM, Thomas Adam tho...@fvwm.org wrote:
  I'm not sure the entire patch is necessary.  What's wrong with using
  NoFuncHint?
 
 I wasn't aware of it. Indeed the documentation states exactly the same
 functionality as I wanted to implement. Unfortunately, I can't get it
 to work. I.e. With my patch and with
 
Style evince MwmHintsIgnore
 
 in .fvwmrc, the frame is shown. But without my patch and with:
 
Style evince NoFuncHint
 
 in .fvwmrc, the frame is not shown. Is this a bug, or am I doing
 something wrong?
 
 Regards,
 Dov
 
 
  -- Thomas Adam
 

I have had some syle settings fail to apply to some Gtk+ app recently. I
guessed it was setting WM_CLASS after the window was all set up, if
that's even possible. I didn't investigate because I decided years ago
to have as little as possible to do with Gnome and the horrid idiots
behind freedesktop.org in general. I tried for 13 years to get and keep
consistent comfortable workflows on Linux desktops, and in the end I
just had to conclude it was never going to happen. It's been about 5
years since I gave up, but within that time, even with minimal use of
desktop programs at all, I've had to add Gtk+ to the heap of software I
want as little to do with as possible.

For most of those 13 years it looked like the idiots were obsessed with
emulating industry standards which were vague and poorly chosen in
the first place. Now tablets are more popular than desktops the Gnome
people are trying new things, but the idiots are still focused on
implementing and forcing on their users things they *feel* are are the
Latest Greatest Progress, when they collectively haven't got the
intelligence to truly judge. Their use of that religious icon of a
word, progress, makes them feel they have a right to screw with you
and your workflow however they please, and if you complain that makes
you rude or a troll and thus worthy of being banned from discussion.

-- 
Developing the austere intellectual discipline of keeping things
sufficiently simple is in this environment a formidable challenge,
both technically and educationally.
 -- Dijstraka, EWD898, 1984



Re: FVWM: Force restore of titles and borders on Gnome applications

2015-06-09 Thread Thomas Adam
On Tue, Jun 09, 2015 at 10:38:09AM +0300, Dov Grobgeld wrote:
 Here's the patch. (Though I still prefer github pull requests.)

Software existed before Github made all the coffee-drinking hair-dos of
today rise out of their pretty seats with their sunglasses to click a few
buttons on a UI and declare I can write code.  FVWM uses CVS.

 I'm not sure that all the changes in ewmh.c are really necessary.

I'm not sure the entire patch is necessary.  What's wrong with using
NoFuncHint?

-- Thomas Adam



Re: FVWM: Force restore of titles and borders on Gnome applications

2015-06-09 Thread Dov Grobgeld
On Tue, Jun 9, 2015 at 11:43 AM, Thomas Adam tho...@fvwm.org wrote:
 I'm not sure the entire patch is necessary.  What's wrong with using
 NoFuncHint?

I wasn't aware of it. Indeed the documentation states exactly the same
functionality as I wanted to implement. Unfortunately, I can't get it
to work. I.e. With my patch and with

   Style evince MwmHintsIgnore

in .fvwmrc, the frame is shown. But without my patch and with:

   Style evince NoFuncHint

in .fvwmrc, the frame is not shown. Is this a bug, or am I doing
something wrong?

Regards,
Dov


 -- Thomas Adam



Re: FVWM: Force restore of titles and borders on Gnome applications

2015-06-09 Thread Dov Grobgeld
Here's the patch. (Though I still prefer github pull requests.)

I'm not sure that all the changes in ewmh.c are really necessary.

~~

The below patch introduces a new style property MwmHintsIgnore. When
this property is set, MWM hints requested by the application, are
blocked, and the default properties are used.

~~

From 34bd4ed36feac160f5fcf9741d14f79e01d2a004 Mon Sep 17 00:00:00 2001
From: Dov Grobgeld dov.grobg...@gmail.com
Date: Tue, 9 Jun 2015 10:34:24 +0300
Subject: [PATCH] Introduced MwmHintsIgnore style property to block all MWM
 hints.

---
 fvwm/decorations.c  |  4 ++--
 fvwm/ewmh.c | 16 
 fvwm/fvwm.h |  1 +
 fvwm/style.c|  6 ++
 fvwm/style.h|  4 
 fvwm/window_flags.h |  2 ++
 6 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/fvwm/decorations.c b/fvwm/decorations.c
index 0f39696..51fe2eb 100644
--- a/fvwm/decorations.c
+++ b/fvwm/decorations.c
@@ -344,7 +344,7 @@ void SelectDecor(FvwmWindow *t, window_style
*pstyle, short *buttons)

 decor = MWM_DECOR_ALL;
 t-functions = MWM_FUNC_ALL;
-if (t-mwm_hints)
+if (!DO_MWM_HINTS_IGNORE(pstyle)  t-mwm_hints)
 {
 prop = (PropMwmHints *)t-mwm_hints;
 if (SHAS_MWM_DECOR(sflags))
@@ -524,7 +524,7 @@ void SelectDecor(FvwmWindow *t, window_style
*pstyle, short *buttons)
 SET_HAS_TITLE(t, 0);
 SET_HAS_HANDLES(t, 0);

-used_width = 0;
+used_width = 0;
 if (decor  MWM_DECOR_BORDER)
 {
 /* A narrow border is displayed (5 pixels - 2 relief, 1 top,
diff --git a/fvwm/ewmh.c b/fvwm/ewmh.c
index 96cfdac..c6375ce 100644
--- a/fvwm/ewmh.c
+++ b/fvwm/ewmh.c
@@ -1343,6 +1343,10 @@ int ewmh_HandleDesktop(EWMH_CMD_ARGS)
 S_SET_DO_CIRCULATE_SKIP(SCM(*style), 1);
 S_SET_DO_CIRCULATE_SKIP(SCC(*style), 1);

+S_SET_DO_MWM_HINTS_IGNORE(SCF(*style), 0);
+S_SET_DO_MWM_HINTS_IGNORE(SCM(*style), 0);
+S_SET_DO_MWM_HINTS_IGNORE(SCC(*style), 0);
+
 S_SET_IS_UNICONIFIABLE(SCF(*style), 1);
 S_SET_IS_UNICONIFIABLE(SCM(*style), 1);
 S_SET_IS_UNICONIFIABLE(SCC(*style), 1);
@@ -1426,6 +1430,10 @@ int ewmh_HandleDock(EWMH_CMD_ARGS)
 S_SET_DO_CIRCULATE_SKIP(SCM(*style), 1);
 S_SET_DO_CIRCULATE_SKIP(SCC(*style), 1);

+S_SET_DO_MWM_HINTS_IGNORE(SCF(*style), 0);
+S_SET_DO_MWM_HINTS_IGNORE(SCM(*style), 0);
+S_SET_DO_MWM_HINTS_IGNORE(SCC(*style), 0);
+
 S_SET_IS_UNICONIFIABLE(SCF(*style), 1);
 S_SET_IS_UNICONIFIABLE(SCM(*style), 1);
 S_SET_IS_UNICONIFIABLE(SCC(*style), 1);
@@ -1471,6 +1479,10 @@ int ewmh_HandleMenu(EWMH_CMD_ARGS)
 S_SET_DO_CIRCULATE_SKIP(SCM(*style), 1);
 S_SET_DO_CIRCULATE_SKIP(SCC(*style), 1);

+S_SET_DO_MWM_HINTS_IGNORE(SCF(*style), 0);
+S_SET_DO_MWM_HINTS_IGNORE(SCM(*style), 0);
+S_SET_DO_MWM_HINTS_IGNORE(SCC(*style), 0);
+
 /* NeverFocus */
 FPS_LENIENT(S_FOCUS_POLICY(SCF(*style)), 0);
 FPS_LENIENT(S_FOCUS_POLICY(SCM(*style)), 1);
@@ -1527,6 +1539,10 @@ int ewmh_HandleToolBar(EWMH_CMD_ARGS)
 S_SET_DO_CIRCULATE_SKIP(SCM(*style), 1);
 S_SET_DO_CIRCULATE_SKIP(SCC(*style), 1);

+S_SET_DO_MWM_HINTS_IGNORE(SCF(*style), 0);
+S_SET_DO_MWM_HINTS_IGNORE(SCM(*style), 0);
+S_SET_DO_MWM_HINTS_IGNORE(SCC(*style), 0);
+
 /* no title ? MWM hints should be used by the app but ... */

 return 1;
diff --git a/fvwm/fvwm.h b/fvwm/fvwm.h
index ddeb8c9..d1256d5 100644
--- a/fvwm/fvwm.h
+++ b/fvwm/fvwm.h
@@ -226,6 +226,7 @@ typedef struct
 unsigned do_shrink_windowshade : 1;
 unsigned do_stack_transient_parent : 1;
 unsigned do_window_list_skip : 1;
+unsigned do_mwm_hints_ignore : 1;
 unsigned ewmh_maximize_mode : 2; /* see ewmh.h */
 unsigned has_depressable_border : 1;
 unsigned has_mwm_border : 1;
diff --git a/fvwm/style.c b/fvwm/style.c
index eebf4f8..96db4d9 100644
--- a/fvwm/style.c
+++ b/fvwm/style.c
@@ -3285,6 +3285,12 @@ static Bool style_parse_one_style_option(
 ps-flag_mask.has_mwm_functions = 1;
 ps-change_mask.has_mwm_functions = 1;
 }
+else if (StrEquals(token, MwmHintsIgnore))
+{
+S_SET_DO_MWM_HINTS_IGNORE(SCF(*ps), on);
+S_SET_DO_MWM_HINTS_IGNORE(SCM(*ps), 1);
+S_SET_DO_MWM_HINTS_IGNORE(SCC(*ps), 1);
+}
 else if (StrEquals(token, MouseFocus))
 {
 style_set_old_focus_policy(ps, 1);
diff --git a/fvwm/style.h b/fvwm/style.h
index 0a2bc68..56c7398 100644
--- a/fvwm/style.h
+++ b/fvwm/style.h
@@ -151,8 +151,12 @@
 ((c).is_sticky_across_desks = !!(x))
 #define S_DO_CIRCULATE_SKIP(c) \
 ((c).s.do_circulate_skip)
+#define S_DO_MWM_HINTS_IGNORE(c) \
+((c).s.do_mwm_hints_ignore)
 #define S_SET_DO_CIRCULATE_SKIP(c,x) \
 ((c).s.do_circulate_skip = !!(x))
+#define S_SET_DO_MWM_HINTS_IGNORE(c,x) \
+((c).s.do_mwm_hints_ignore = !!(x))
 #define S_DO_CIRCULATE_SKIP_ICON(c) \
 

Re: FVWM: Force restore of titles and borders on Gnome applications

2015-06-09 Thread Dov Grobgeld
As suggested privately by Elliot S, I created a new style property
MwmHintsIgnore that has the desired effect. When set, the Mwm hints
that are responsible for erasing the title and the handles, are
ignored, and thus the default styles are used.

Is there an official fvwm repo for pull requests?

Regards,
Dov

On Tue, Jun 9, 2015 at 8:06 AM, Dov Grobgeld dov.grobg...@gmail.com wrote:

 There are some desktop applications like evince and gThumb that either
 don't exist in mate or are not up-to-date. I therefore prefer using
 the latest gnome apps.

 Meanwhile I have improved my patch to decorations.c (after realizing
 that the resource name is available through the FvwmWindow pointer!)
 so it is a bit better as it at black lists on the application name and
 not its title:

 // Ugly work around to force border width and
 // title on some gnome applications.
 if (strcmp(t-class.res_name,eog)==0
 || strcmp(t-class.res_name,evince)==0
 || strcmp(t-class.res_name,nautilus)==0
 || strcmp(t-class.res_name,gthumb)==0
 )
   decor = -1;

 I still hope to figure out why the style settings do not provide the
 same functionality.

 Regards,
 Dov


 On Tue, Jun 9, 2015 at 5:45 AM, Michael Großer michael.gros...@gmx.de wrote:
  Dov Grobgeld wrote:
  Hello,
 
  In recent Gnome applications, e.g. gthumb, evince, eog, there has been
  a trend to remove the window manager border and title and do these
  internally in the application. I have been looking for a gnome way
  of turning off this behavior as it seriously destroys my work flow,
  and after failing to do so, I tried to make my prefered window manager
  the last twenty years, fvwm, block these requests, but so far without
  any success.
 
  I have tried the following configuration parameters:
 
  Style *   GNOMEIgnoreHints
  Style *   Title,Handles
 
  But unfortunately these are ignored for the gnome windows that still
  end up with the following properties as can be seen by fvwm identify:
 
  Boundary Width: 0
  NoTitle: Yes
 
  Why are these requests ignored? Is there any other property that can
  be used to force the title and the handles? If not, could someone
  point me to the sources where this request is received and how it is
  handled, and where I could block it?
 
  Thanks!
  Dov
 
 
 
  Hi!
 
  I don't know if this helps you or other FVWM users, and I don't
  know how sustainable my solution really is, but...
 
  ... some weeks ago, I set up a new productive environment based
  on Debian Wheezy (Jessie was not stable yet back then).
 
  I too use some tools from KDE and Gnome such as 'konqueror',
  'ksnapshot' or 'gedit'.
 
  When using 'gedit' on my FVWM based desktop, I noticed strange
  behavior: The current tab looks exactly like all other tabs
  (so I cannot optically find out wich one is active) and the
  title bar is not updated correctly by 'gedit'.
 
  My solution is:
  - I strictly do not use tools from KDE4 and Gnome.
  - Instead, I installed Trinity (the fork of KDE3)
and MATE (the fork of Gnome 2)
 
  So my tools are now 'konqueror' / 'ksnapshot' from Trinity
  and the name of my 2nd editor is 'pluma' now instead of 'gedit'.
 
  The result: Everything works fine (insofar as one can expect from
  a thoroughly tailored VNC environment - working with xvnc4viewer).
 
  I don't know which nasty surprises I will expect when I will
  setup my first Debian Jessie environment with the
  same strategy, but with Wheezy, I just got away with that,
  particularly also because I do not need some really new
  features of the tools I use from Trinity and MATE and
  because I can be sure that the forks are maintained to some
  degree (regarding security aspects and so on) by their
  respective maintainers.
 
  So, try looking whether MATE provides all you need from
  Gnome, and perhaps you will be happy for the next few years.
 
  Greetings from Germany,
  Michael



Re: FVWM: Force restore of titles and borders on Gnome applications

2015-06-08 Thread Michael Großer
Dov Grobgeld wrote:
 Hello,
 
 In recent Gnome applications, e.g. gthumb, evince, eog, there has been
 a trend to remove the window manager border and title and do these
 internally in the application. I have been looking for a gnome way
 of turning off this behavior as it seriously destroys my work flow,
 and after failing to do so, I tried to make my prefered window manager
 the last twenty years, fvwm, block these requests, but so far without
 any success.
 
 I have tried the following configuration parameters:
 
 Style *   GNOMEIgnoreHints
 Style *   Title,Handles
 
 But unfortunately these are ignored for the gnome windows that still
 end up with the following properties as can be seen by fvwm identify:
 
 Boundary Width: 0
 NoTitle: Yes
 
 Why are these requests ignored? Is there any other property that can
 be used to force the title and the handles? If not, could someone
 point me to the sources where this request is received and how it is
 handled, and where I could block it?
 
 Thanks!
 Dov
 
 

Hi!

I don't know if this helps you or other FVWM users, and I don't
know how sustainable my solution really is, but...

... some weeks ago, I set up a new productive environment based
on Debian Wheezy (Jessie was not stable yet back then).

I too use some tools from KDE and Gnome such as 'konqueror',
'ksnapshot' or 'gedit'.

When using 'gedit' on my FVWM based desktop, I noticed strange
behavior: The current tab looks exactly like all other tabs
(so I cannot optically find out wich one is active) and the
title bar is not updated correctly by 'gedit'.

My solution is:
- I strictly do not use tools from KDE4 and Gnome.
- Instead, I installed Trinity (the fork of KDE3)
  and MATE (the fork of Gnome 2)

So my tools are now 'konqueror' / 'ksnapshot' from Trinity
and the name of my 2nd editor is 'pluma' now instead of 'gedit'.

The result: Everything works fine (insofar as one can expect from
a thoroughly tailored VNC environment - working with xvnc4viewer).

I don't know which nasty surprises I will expect when I will
setup my first Debian Jessie environment with the
same strategy, but with Wheezy, I just got away with that,
particularly also because I do not need some really new
features of the tools I use from Trinity and MATE and
because I can be sure that the forks are maintained to some
degree (regarding security aspects and so on) by their
respective maintainers.

So, try looking whether MATE provides all you need from
Gnome, and perhaps you will be happy for the next few years.

Greetings from Germany,
Michael



Re: FVWM: Force restore of titles and borders on Gnome applications

2015-06-08 Thread Dov Grobgeld
There are some desktop applications like evince and gThumb that either
don't exist in mate or are not up-to-date. I therefore prefer using
the latest gnome apps.

Meanwhile I have improved my patch to decorations.c (after realizing
that the resource name is available through the FvwmWindow pointer!)
so it is a bit better as it at black lists on the application name and
not its title:

// Ugly work around to force border width and
// title on some gnome applications.
if (strcmp(t-class.res_name,eog)==0
|| strcmp(t-class.res_name,evince)==0
|| strcmp(t-class.res_name,nautilus)==0
|| strcmp(t-class.res_name,gthumb)==0
)
  decor = -1;

I still hope to figure out why the style settings do not provide the
same functionality.

Regards,
Dov


On Tue, Jun 9, 2015 at 5:45 AM, Michael Großer michael.gros...@gmx.de wrote:
 Dov Grobgeld wrote:
 Hello,

 In recent Gnome applications, e.g. gthumb, evince, eog, there has been
 a trend to remove the window manager border and title and do these
 internally in the application. I have been looking for a gnome way
 of turning off this behavior as it seriously destroys my work flow,
 and after failing to do so, I tried to make my prefered window manager
 the last twenty years, fvwm, block these requests, but so far without
 any success.

 I have tried the following configuration parameters:

 Style *   GNOMEIgnoreHints
 Style *   Title,Handles

 But unfortunately these are ignored for the gnome windows that still
 end up with the following properties as can be seen by fvwm identify:

 Boundary Width: 0
 NoTitle: Yes

 Why are these requests ignored? Is there any other property that can
 be used to force the title and the handles? If not, could someone
 point me to the sources where this request is received and how it is
 handled, and where I could block it?

 Thanks!
 Dov



 Hi!

 I don't know if this helps you or other FVWM users, and I don't
 know how sustainable my solution really is, but...

 ... some weeks ago, I set up a new productive environment based
 on Debian Wheezy (Jessie was not stable yet back then).

 I too use some tools from KDE and Gnome such as 'konqueror',
 'ksnapshot' or 'gedit'.

 When using 'gedit' on my FVWM based desktop, I noticed strange
 behavior: The current tab looks exactly like all other tabs
 (so I cannot optically find out wich one is active) and the
 title bar is not updated correctly by 'gedit'.

 My solution is:
 - I strictly do not use tools from KDE4 and Gnome.
 - Instead, I installed Trinity (the fork of KDE3)
   and MATE (the fork of Gnome 2)

 So my tools are now 'konqueror' / 'ksnapshot' from Trinity
 and the name of my 2nd editor is 'pluma' now instead of 'gedit'.

 The result: Everything works fine (insofar as one can expect from
 a thoroughly tailored VNC environment - working with xvnc4viewer).

 I don't know which nasty surprises I will expect when I will
 setup my first Debian Jessie environment with the
 same strategy, but with Wheezy, I just got away with that,
 particularly also because I do not need some really new
 features of the tools I use from Trinity and MATE and
 because I can be sure that the forks are maintained to some
 degree (regarding security aspects and so on) by their
 respective maintainers.

 So, try looking whether MATE provides all you need from
 Gnome, and perhaps you will be happy for the next few years.

 Greetings from Germany,
 Michael



Re: FVWM: Force restore of titles and borders on Gnome applications

2015-06-08 Thread Thomas Adam
On 8 June 2015 at 10:16, Dov Grobgeld dov.grobg...@gmail.com wrote:
 Hello,

 In recent Gnome applications, e.g. gthumb, evince, eog, there has been
 a trend to remove the window manager border and title and do these
 internally in the application. I have been looking for a gnome way
 of turning off this behavior as it seriously destroys my work flow,
 and after failing to do so, I tried to make my prefered window manager
 the last twenty years, fvwm, block these requests, but so far without
 any success.

https://github.com/PCMan/gtk3-nocsd

-- Thomas Adam



Re: FVWM: Force restore of titles and borders on Gnome applications

2015-06-08 Thread Dov Grobgeld
Thanks. I used to use the LD_PRELOAD hack, but it stopped working
under Fedora 22.

Meanwhile I got a very ugly and hackish workaround by adding the
following code to decorations.c in fvwm. Actually this hack just
illustrates that the style matching fails, but that it is possible
to get fvwm to override the requested settings:

// Ugly work around to force border width and
// title on some gnome applications.
if (strcmp(t-name.name,Image Viewer)==0   // eog
|| strcmp(t-name.name,Recent Documents)==0  // evince
|| strcmp(t-name.name,Home) == 0 // nautilus
|| strcmp(t-name.name,gThumb) == 0 // gthumb
//|| strcmp(t-name.name,New Tab - Google
Chrome) == 0 // google chrome
)
  {
used_width = 5;
border_width = 5;
decor = -1;
  }


Dov

On Mon, Jun 8, 2015 at 12:28 PM, Thomas Adam tho...@fvwm.org wrote:
 On 8 June 2015 at 10:16, Dov Grobgeld dov.grobg...@gmail.com wrote:
 Hello,

 In recent Gnome applications, e.g. gthumb, evince, eog, there has been
 a trend to remove the window manager border and title and do these
 internally in the application. I have been looking for a gnome way
 of turning off this behavior as it seriously destroys my work flow,
 and after failing to do so, I tried to make my prefered window manager
 the last twenty years, fvwm, block these requests, but so far without
 any success.

 https://github.com/PCMan/gtk3-nocsd

 -- Thomas Adam