[cdesktopenv-devel] [PATCH] dtwm: basic multihead(xinerama only) support

2016-06-24 Thread Matthew R. Trower

This code wraps DtXinerama for now; I have some plans to additionally
support RandR through the same interface in the future.


=Addresses=

* maximization
* sane initial window placement (for most windows)

Firefox is strange situation. When maximized, it expands to double the
X Screen width even on single head displays.  This patch fixes this
behavior on multihead, so I'd guess maxWidth gets set wrong on creation.
Will require more investigation.


=Improvements to be made=

Apparently some windows, such as the dtmail preferences dialog, are
spawned using different placement code.  That one just appears at
origin. I'd welcome information regarding other anomalies, or places
where CDE breaks with multihead.

There's some disagreement regarding integer coordinate types
(see code comment WmMultiHead.c:91) which causes compiler warnings.
Please advise on a proper resolution as time allows.

My Imakefile additions get the job done, but may not match convention.



-- Matthew R. Trower
>From 7eece4588c25105630acad7da926f88b13a9433f Mon Sep 17 00:00:00 2001
From: "Matthew R. Trower" 
Date: Thu, 23 Jun 2016 02:25:00 -0500
Subject: [PATCH] dtwm: basic multihead(xinerama only) support

* maximization (also partially fixes strange Firefox behaviour)
* sane initial window placement

Firefox is stranger than most; it appears to maximize to double
X Screen width even on single head displays.  Fixed (on multihead).
---
 cde/programs/dtwm/Imakefile |  10 ++--
 cde/programs/dtwm/WmMultiHead.c | 113 
 cde/programs/dtwm/WmMultiHead.h |  37 +
 cde/programs/dtwm/WmWinInfo.c   |  26 +++--
 cde/programs/dtwm/WmWinState.c  |  16 ++
 5 files changed, 194 insertions(+), 8 deletions(-)
 create mode 100644 cde/programs/dtwm/WmMultiHead.c
 create mode 100644 cde/programs/dtwm/WmMultiHead.h

diff --git a/cde/programs/dtwm/Imakefile b/cde/programs/dtwm/Imakefile
index fa10741..258127a 100644
--- a/cde/programs/dtwm/Imakefile
+++ b/cde/programs/dtwm/Imakefile
@@ -15,8 +15,8 @@ DEPEND_DEFINES = $(DEPENDDEFINES)
 DEFINES = $(MWMDEFINES) $(DTWMDEFINES) -DMULTIBYTE -DMINIMAL_DT
 
 DEPLIBS = DepDtClientLibs
-LOCAL_LIBRARIES = DtClientLibs
-SYS_LIBRARIES = DtClientSysLibs DtClientExtraLibs
+LOCAL_LIBRARIES = DtClientLibs -lDtXinerama
+SYS_LIBRARIES = DtClientSysLibs DtClientExtraLibs -lXinerama
 
 #if defined(HPArchitecture)
 EXTRA_DEFINES = -D_HPUX_SOURCE 
@@ -32,7 +32,8 @@ SRCSXM = \
 WmMenu.cWmProperty.cWmProtocol.c \
 WmResCvt.c  WmResParse.cWmResource.c \
 WmSignal.c  WmWinConf.c WmWinInfo.c \
-WmWinList.c WmWinState.cversion.c
+WmWinList.c WmWinState.cversion.c \
+WmMultihead.c
 
 SRCSDT = \
 Button.cCallback.c  Clock.c \
@@ -53,7 +54,8 @@ OBJSXM = \
 WmMenu.oWmProperty.oWmProtocol.o \
 WmResCvt.o  WmResParse.oWmResource.o \
 WmSignal.o  WmWinConf.o WmWinInfo.o \
-WmWinList.o WmWinState.oversion.o
+WmWinList.o WmWinState.oversion.o \
+WmMultiHead.o
 
 OBJSDT = \
 Button.oCallback.o  Clock.o \
diff --git a/cde/programs/dtwm/WmMultiHead.c b/cde/programs/dtwm/WmMultiHead.c
new file mode 100644
index 000..4de6c6b
--- /dev/null
+++ b/cde/programs/dtwm/WmMultiHead.c
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2016 Matthew R. Trower
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include 
+#include 
+
+/*
+ * Included Files:
+ */
+#include 
+
+#include "WmMultiHead.h"
+
+/*
+ * Global Variables
+ */
+DtXineramaInfo_t *DtXI = NULL;/* Xinerama data is static for life of X server */
+
+
+/*<->*
+ *
+ *  GetHeadInfo (pcd)
+ *
+ *
+ *  Description:
+ *  ---
+ *  S

Re: [cdesktopenv-devel] New to the list

2016-08-02 Thread Matthew R. Trower
Hello Swift,

I care. I'd love to see some new features added to CDE - if nothing
else, to bring it up to speed with the rest of the world. For example,
I think we really need proper support for multi-head setups, and I'd
love to see dtMail fully support IMAP. DtLogin should (probably?)
support system actions like shutdown and reboot. Creation and assignment
of types and actions could probably be streamlined, or at least
scripted. I'd love to see support for unicode. I think dtwm could behave
more intelligently in many circumstances - the list goes on and on. 
Creating entirely new applications may be an ambitious undertaking, but 
I'd love to hear your ideas.

The focus of the project thus far seems to have mainly been on fixing
bugs and polishing up the ports to behave properly on various platforms.
I think these are the major priority (perhaps those with more seniority
here can weigh in on this). There remains a lot to do on that front, and
people have but limited time.

I've done some initial work on multi-head that at least makes it usable,
but am so bogged down with life concerns that I don't find much time to
work on my long list of concerns. I suspect this is the case for most
here. Still, as someone who uses CDE daily, I definitely care.

Good luck, and welcome to the list!


-- Matthew R. Trower




On 08/02/16 14:25, Swift Griggs wrote:
> Hello Folks,
>I'm getting started with Motif coding. I've managed to get CDE compiled
> on NetBSD 7 (what fun!) and I'm still at the 2nd "hello world" pushbutton
> tutorial stage with my own coding. I'm passable with C, but new to Motif.
> I'm currently reading "MOTIF Programming" by Marshall Brain. So far, so
> good. It's a pretty nice book, honestly (probably because it was never a
> textbook, hehe).
>I'm not fond of GTK since it's too closely tied to GNOME and I can't
> stand DBUS or their politics. I do still use glib from time to time,
> though. I don't want to go the FOX, QT, or FLTK route since I'm close to
> worthless in C++, and I'm perfectly OK with callbacks.
>I'm wondering about the future of CDE and Motif in general. Does anyone
> have plans to add more applications and features to CDE in general? I'm a
> fan of 4DWM and Indigo Magic Desktop, too. However, it seems that all
> freeware projects related to recreating those are dead as a doornail
> (sadly). If I can get my chops up to speed, that would be the first thing
> I'd want to work with/on. I'm also excited by the idea that the 'default
> apps' for CDE may be updated or appended to. However, I feel like I must
> be the only one in the world who cares at this point.
>
> -Swift
>
>
> --
> ___
> cdesktopenv-devel mailing list
> cdesktopenv-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel
>


--
___
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel