Skip to content

Commit

Permalink
* Applications/Workspace:
Browse files Browse the repository at this point in the history
  - state restore of display layout moved into WWMInitializeWindowMaker();
  - do not use global 'systemState' variable - XWUpdateScreenInfo() use local
    instance;
  - Dock state restore is managed by Workspace in Controller (code in
    WindowMaker/src/screen.c is disabled - patch added);
  - Showing of Dock is now managed by Workspace in Controller (code in
    WindowMaker/src/dock.c is disabled - path added);
  - check for Xorg DISPLAY on startup;
* Applications/Login:
  - loginwindow.service: "After=gdomap.service" was added.
  - do not start gbps - it will be started automatically by GNUstep.
  • Loading branch information
trunkmaster committed Jan 22, 2018
1 parent bc9f217 commit 3c0e7c5
Show file tree
Hide file tree
Showing 15 changed files with 272 additions and 100 deletions.
52 changes: 26 additions & 26 deletions Applications/Login/.emacs.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,49 @@
;; --------------------------------------------------------------------------
;; Desktop File for Emacs
;; --------------------------------------------------------------------------
;; Created Thu Dec 14 17:43:16 2017
;; Created Sat Jan 20 01:32:08 2018
;; Desktop file format version 206
;; Emacs version 24.3.1

;; Global section:
(setq default-directory "/Users/me/Developer/nextspace/Applications/Login/")
(setq default-directory "/Users/me/Developer/nextspace/Applications/Login/Resources/")
(setq desktop-missing-file-warning nil)
(setq tags-file-name nil)
(setq tags-table-list nil)
(setq search-ring '("authenticateUser" "openSessionFor" "owner" "setSession" "UserSession" "setUserEnvironment" "Unable" "center" "writeT" "write" "NXScreen" "NEXTSPACE" "NXScreen" "cursor" "authenticate" "shrink"))
(setq search-ring '("gpbs" "authenticateUser" "openSessionFor" "owner" "setSession" "UserSession" "setUserEnvironment" "Unable" "center" "writeT" "write" "NXScreen" "NEXTSPACE" "NXScreen" "cursor" "authenticate"))
(setq regexp-search-ring nil)
(setq register-alist nil)
(setq file-name-history '("~/Developer/nextspace/System/usr/NextSpace/bin/gnustep-services" "~/Developer/nextspace/Applications/Login/Resources/Login" "~/.emacs" "~/Developer/nextspace/Applications/Login/Resources/loginwindow.service" "~/Developer/nextspace/Applications/Login/UserSession.m" "~/Developer/nextspace/Applications/Login/GNUmakefile.preamble" "~/Developer/nextspace/Applications/Login/GNUmakefile.postamble" "~/Developer/nextspace/Applications/Login/Preferences/GNUmakefile.preamble" "~/Developer/nextspace/Applications/Login/GNUmakefile" "~/Developer/nextspace/Applications/Login/Preferences/Resources/bundle.registry" "~/Developer/nextspace/Applications/Login/Preferences/GNUmakefile" "~/Developer/nextspace/Applications/Login/Preferences/*.m" "~/Developer/nextspace/Applications/Preferences/" "~/Developer/nextspace/Applications/Preferences/Modules/Font/GNUmakefile" "~/Developer/nextspace/Applications/Preferences/Modules/Font/Resources/bundle.registry" "~/Developer/nextspace/Applications/Preferences/Modules/Font/GNUmakefile" "~/Developer/nextspace/Applications/Preferences/PreferencesInfo.plist" "~/Developer/nextspace/Applications/Preferences/GNUmakefile.*" "~/Developer/nextspace/Applications/Preferences/GNUmakefile" "~/Developer/nextspace/Applications/Preferences/*.[hm]" "~/Developer/nextspace/Applications/Workspace/ModuleLoader.[hm]" "~/Developer/nextspace/Applications/Workspace/Preferences.[hm]" "~/Developer/nextspace/Applications/Workspace/Inspectors/Inspector.[hm]" "~/Developer/nextspace/Applications/Workspace/" "~/Developer/nextspace/Applications/Workspace/Operations/ProcessManager.m" "~/Developer/nextspace/Applications/Workspace/Processes/Processes.m" "~/Developer/nextspace/Applications/Workspace/" "~/Developer/NextSpace/Libraries/GNUstep/gnustep-gui-0.24.1/Source/NSMenu.m" "~/Developer/nextspace/Applications/TimeMon/Percentages.m" "~/Developer/NextSpace/Libraries/GNUstep/gnustep-gui-0.24.1/Source/NSWindow.m"))

;; Buffer section -- buffers listed in same order as in buffer list:
(desktop-create-buffer 206
"/Users/me/Developer/nextspace/Applications/Login/Resources/loginwindow.service"
"loginwindow.service"
'fundamental-mode
'(yas-minor-mode)
78
'(78 nil)
nil
nil
'((buffer-file-coding-system . undecided-unix)))

(desktop-create-buffer 206
"/Users/me/Developer/nextspace/Applications/Login/Login_main.m"
"Login_main.m"
'objc-mode
'(abbrev-mode yas-minor-mode auto-complete-mode company-mode hs-minor-mode flycheck-mode irony-mode)
4481
'(4475 nil)
nil
nil
'((buffer-file-coding-system . undecided-unix)))

(desktop-create-buffer 206
"/Users/me/Developer/nextspace/Applications/Login/UserSession.m"
"UserSession.m"
'objc-mode
'(abbrev-mode yas-minor-mode company-mode hs-minor-mode)
1604
4571
'(3962 nil)
nil
nil
Expand Down Expand Up @@ -72,17 +94,6 @@
nil
'((buffer-file-coding-system . undecided-unix)))

(desktop-create-buffer 206
"/Users/me/Developer/nextspace/Applications/Login/Login_main.m"
"Login_main.m"
'objc-mode
'(abbrev-mode yas-minor-mode auto-complete-mode company-mode hs-minor-mode flycheck-mode irony-mode)
5523
'(1516 nil)
nil
nil
'((buffer-file-coding-system . undecided-unix)))

(desktop-create-buffer 206
"/Users/me/Developer/nextspace/System/usr/NextSpace/bin/gnustep-services"
"gnustep-services"
Expand All @@ -105,17 +116,6 @@
nil
'((buffer-file-coding-system . undecided-unix)))

(desktop-create-buffer 206
"/Users/me/Developer/nextspace/Applications/Login/Resources/loginwindow.service"
"loginwindow.service"
'fundamental-mode
'(yas-minor-mode)
1136
'(128 nil)
nil
nil
'((buffer-file-coding-system . undecided-unix)))

(desktop-create-buffer 206
"/Users/me/.emacs"
".emacs"
Expand Down
1 change: 0 additions & 1 deletion Applications/Login/Login_main.m
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ int main(int argc, const char ** argv)
if (!startWindowServer())
{
system("xrdb -merge /etc/X11/Xresources.nextspace");
// system("/Library/bin/gpbs --daemon");
startPasteboardService();
plymouthQuit(YES);
// Setup layout and gamma.
Expand Down
2 changes: 1 addition & 1 deletion Applications/Login/Resources/loginwindow.service
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Description=NEXTSPACE Login Panel

# Dependencies to GNUstep services
# TODO: gpbs should start after Xorg was started.
Requires=gdomap.service

# replaces the getty
Conflicts=getty@tty1.service
After=getty@tty1.service
After=gdomap.service

# replaces plymouth-quit since it quits plymouth on its own
Conflicts=plymouth-quit.service
Expand Down
107 changes: 92 additions & 15 deletions Applications/Workspace/.emacs.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,127 @@
;; --------------------------------------------------------------------------
;; Desktop File for Emacs
;; --------------------------------------------------------------------------
;; Created Thu Dec 21 00:57:10 2017
;; Created Sun Jan 21 01:35:09 2018
;; Desktop file format version 206
;; Emacs version 24.3.1

;; Global section:
(setq default-directory "/Users/me/Developer/nextspace/Applications/Workspace/WindowMaker/src/")
(setq default-directory "/Users/me/Developer/nextspace/Applications/Workspace/")
(setq desktop-missing-file-warning nil)
(setq tags-file-name nil)
(setq tags-table-list nil)
(setq search-ring '("NEXTSPACE" "handleButtonPress" "windowmaps" "_startBack" "_initBackend" "Exceptio" "Exception" "resolution" "systemSc" "current" "setMain" "currResol" "resoltion" "mode-line" "StartupH"))
(setq search-ring '("wDockRest" "MapWindow" "HideIcons" "XWUpda" "NEXTSPACE" "handleButtonPress" "windowmaps" "_startBack" "_initBackend" "Exceptio" "Exception" "resolution" "systemSc" "current" "setMain" "currResol"))
(setq regexp-search-ring nil)
(setq register-alist nil)
(setq file-name-history '("~/Developer/nextspace/Applications/Workspace" "~/Developer/nextspace/Applications/Workspace/" "~/Developer/nextspace/Applications/Workspace/WindowMaker/src/event.c" "~/Developer/nextspace/Applications/Workspace/Workspace_main.m" "~/Developer/nextspace/Applications/Workspace/" "~/Developer/nextspace/Applications/Workspace/Controller.m" "~/Developer/nextspace/Frameworks/NXAppKit/" "~/Developer/GNUstep/gui-trunk/Source/NSWindow.m" "~/Developer/nextspace/Frameworks/NXAppKit/NXAlert.*" "~/Developer/nextspace/Frameworks/NXAppKit/" "~/Developer/nextspace/Frameworks/NXSystem/" "~/.emacs" "~/Developer/nextspace/Frameworks/NXSystem/NXDisplay.*" "~/Developer/nextspace/Applications/Workspace/Workspace+WindowMaker.*" "~/Developer/nextspace/Frameworks/NXSystem/NXScreen.*" "~/Developer/nextspace/Frameworks/NXAppKit/NXAlert.m" "~/Developer/nextspace/Frameworks/NXAppKit/NXAlert.h" "~/Developer/nextspace/Applications/Workspace/Workspace+WindowMaker.m" "~/Developer/nextspace/Frameworks/NXSystem/NXScreen.m" "~/Developer/nextspace/Frameworks/NXSystem/NXDisplay.m" "~/Developer/nextspace/Frameworks/NXSystem/GNUmakefile.preamble" "~/Developer/nextspace/Frameworks/NXSystem/NXDisplay.m" "~/Developer/nextspace/Frameworks/NXSystem/NXScreen.m" "~/Developer/nextspace/Applications/Workspace/GNUmakefile.postamble" "~/rpmbuild/SPECS/nextspace-gnustep.spec" "~/Developer/nextspace/Applications/Login/Controller.m" "~/Developer/nextspace/Applications/Workspace/Operations/BGOperation.m" "~/Developer/nextspace/Applications/Workspace/Operations/BGOperation.h" "~/Developer/nextspace/Applications/Workspace/" "~/Developer/nextspace/Applications/Weather/YQL.[hm]"))
(setq file-name-history '("~/Developer/nextspace/Applications/Workspace" "~/Developer/nextspace/Applications/Workspace/WindowMaker/src/screen.*" "~/Developer/nextspace/Applications/Workspace/WindowMaker/src/dock.*" "~/Developer/nextspace/Applications/Workspace/Workspace+WindowMaker.*" "~/Developer/nextspace/Applications/Workspace" "~/Developer/nextspace/Applications/Workspace/" "~/Developer/nextspace/Applications/Workspace/WindowMaker/src/event.c" "~/Developer/nextspace/Applications/Workspace/Workspace_main.m" "~/Developer/nextspace/Applications/Workspace/" "~/Developer/nextspace/Applications/Workspace/Controller.m" "~/Developer/nextspace/Frameworks/NXAppKit/" "~/Developer/GNUstep/gui-trunk/Source/NSWindow.m" "~/Developer/nextspace/Frameworks/NXAppKit/NXAlert.*" "~/Developer/nextspace/Frameworks/NXAppKit/" "~/Developer/nextspace/Frameworks/NXSystem/" "~/.emacs" "~/Developer/nextspace/Frameworks/NXSystem/NXDisplay.*" "~/Developer/nextspace/Applications/Workspace/Workspace+WindowMaker.*" "~/Developer/nextspace/Frameworks/NXSystem/NXScreen.*" "~/Developer/nextspace/Frameworks/NXAppKit/NXAlert.m" "~/Developer/nextspace/Frameworks/NXAppKit/NXAlert.h" "~/Developer/nextspace/Applications/Workspace/Workspace+WindowMaker.m" "~/Developer/nextspace/Frameworks/NXSystem/NXScreen.m" "~/Developer/nextspace/Frameworks/NXSystem/NXDisplay.m" "~/Developer/nextspace/Frameworks/NXSystem/GNUmakefile.preamble" "~/Developer/nextspace/Frameworks/NXSystem/NXDisplay.m" "~/Developer/nextspace/Frameworks/NXSystem/NXScreen.m" "~/Developer/nextspace/Applications/Workspace/GNUmakefile.postamble" "~/rpmbuild/SPECS/nextspace-gnustep.spec" "~/Developer/nextspace/Applications/Login/Controller.m"))

;; Buffer section -- buffers listed in same order as in buffer list:
(desktop-create-buffer 206
"/Users/me/Developer/nextspace/Applications/Workspace/WindowMaker/src/event.c"
"event.c"
"/Users/me/Developer/nextspace/Applications/Workspace/Controller.m"
"Controller.m"
'objc-mode
'(abbrev-mode yas-minor-mode auto-complete-mode company-mode hs-minor-mode flycheck-mode irony-mode)
12012
'(14108 nil)
nil
nil
'((buffer-file-coding-system . undecided-unix)))

(desktop-create-buffer 206
"/Users/me/Developer/nextspace/Applications/Workspace/Workspace+WindowMaker.m"
"Workspace+WindowMaker.m"
'objc-mode
'(abbrev-mode yas-minor-mode company-mode hs-minor-mode)
8630
'(8612 nil)
nil
nil
'((buffer-file-coding-system . undecided-unix)))

(desktop-create-buffer 206
"/Users/me/Developer/nextspace/Applications/Workspace/WindowMaker/src/screen.c"
"screen.c"
'c-mode
'(abbrev-mode yas-minor-mode company-mode hs-minor-mode)
23767
'(21242 nil)
28558
'(28551 nil)
nil
nil
'((buffer-file-coding-system . undecided-unix) (overwrite-mode)))
'((buffer-file-coding-system . undecided-unix)))

(desktop-create-buffer 206
"/Users/me/Developer/nextspace/Applications/Workspace/Workspace+WindowMaker.h"
"Workspace+WindowMaker.h"
'c-mode
'(abbrev-mode yas-minor-mode company-mode hs-minor-mode)
2132
'(2109 nil)
nil
nil
'((buffer-file-coding-system . undecided-unix)))

(desktop-create-buffer 206
"/Users/me/Developer/nextspace/Applications/Workspace/WindowMaker/src/screen.h"
"screen.h"
'c-mode
'(abbrev-mode yas-minor-mode company-mode hs-minor-mode)
1
'(nil nil)
nil
nil
'((buffer-file-coding-system . undecided-unix)))

(desktop-create-buffer 206
"/Users/me/Developer/nextspace/Applications/Workspace/WindowMaker/src/dock.c"
"dock.c"
'c-mode
'(abbrev-mode yas-minor-mode company-mode hs-minor-mode)
48148
'(1 nil)
nil
nil
'((buffer-file-coding-system . undecided-unix)))

(desktop-create-buffer 206
"/Users/me/Developer/nextspace/Applications/Workspace/Workspace_main.m"
"Workspace_main.m"
'objc-mode
'(abbrev-mode yas-minor-mode company-mode hs-minor-mode)
1583
1684
'(1352 nil)
nil
nil
'((buffer-file-coding-system . undecided-unix)))

(desktop-create-buffer 206
"/Users/me/Developer/nextspace/Applications/Workspace/WindowMaker/src/dock.h"
"dock.h"
'c-mode
'(abbrev-mode yas-minor-mode company-mode hs-minor-mode)
1
'(nil nil)
nil
nil
'((buffer-file-coding-system . undecided-unix)))

(desktop-create-buffer 206
"/Users/me/Developer/nextspace/Applications/Workspace/Controller.m"
"Controller.m"
"/Users/me/Developer/nextspace/Applications/Workspace/WindowMaker/src/event.c"
"event.c"
'c-mode
'(abbrev-mode yas-minor-mode company-mode hs-minor-mode)
14946
'(1310 nil)
nil
nil
'((buffer-file-coding-system . undecided-unix) (overwrite-mode)))

(desktop-create-buffer 206
"/Users/me/Developer/nextspace/Applications/Workspace/Controller.h"
"Controller.h"
'objc-mode
'(abbrev-mode yas-minor-mode auto-complete-mode company-mode hs-minor-mode flycheck-mode irony-mode)
13962
'(nil nil)
'(abbrev-mode yas-minor-mode company-mode hs-minor-mode)
1059
'(1427 nil)
nil
nil
'((buffer-file-coding-system . undecided-unix)))
Expand Down
5 changes: 5 additions & 0 deletions Applications/Workspace/Controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
@class Inspector;
@class Processes;
@class ProcessManager;
@class NXScreen;
@class NXPower;

@interface Controller : NSObject
{
Expand All @@ -48,6 +50,9 @@
id machineType, cpuType, cpuClock, memory;
id baseVersion, guiVersion;

NXScreen *systemScreen;
NXPower *systemPower;

FileViewer *rootViewer;
NSMutableArray *fileViewers;
NXFileSystemMonitor *fileSystemMonitor;
Expand Down
25 changes: 13 additions & 12 deletions Applications/Workspace/Controller.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
#import <NXSystem/NXSystemInfo.h>
#import <NXSystem/NXMediaManager.h>
#import <NXSystem/NXFileSystemMonitor.h>
#import <NXSystem/NXScreen.h>
#import <NXSystem/NXDisplay.h>
#import <NXSystem/NXPower.h>

#import "Workspace+WindowMaker.h"

Expand Down Expand Up @@ -390,10 +393,10 @@ - (void)applicationWillFinishLaunching:(NSNotification *)notif
NSImage *appImage;
NSString *operatingSystem;

//NSUpdateDynamicServices(); -- app won't start
//[[NSWorkspace sharedWorkspace] findApplications]; -- won't start
//NSUpdateDynamicServices();
//[[NSWorkspace sharedWorkspace] findApplications];

#if 0
#if 0
// Set appicon image
operatingSystem = [NXSystemInfo operatingSystem];
if ([operatingSystem rangeOfString:@"CentOS"].location != NSNotFound)
Expand All @@ -418,16 +421,12 @@ - (void)applicationWillFinishLaunching:(NSNotification *)notif
#endif

procManager = [ProcessManager shared];
// ProcessManager created - Workspace is ready to register applications.
// Invoke Dock apps autolaunch.
if (procManager && useInternalWindowManager)
{
wDockDoAutoLaunch(wScreenWithNumber(0)->dock, 0);
}

// Detect lid close/open events
if (useInternalWindowManager)
{
systemScreen = [NXScreen new];

// Detect lid close/open events
systemPower = [NXPower new];
[systemPower startEventsMonitor];
[[NSNotificationCenter defaultCenter]
Expand Down Expand Up @@ -484,10 +483,12 @@ - (void)applicationDidFinishLaunching:(NSNotification *)notif

[mediaAdaptor checkForRemovableMedia];

// Show 'launched' state
// ProcessManager created - Workspace is ready to register applications.
// Show Dock and start applications in it
if (useInternalWindowManager)
{
WWMSetDockAppiconState(0, 0);
WWMDockShowIcons(wScreenWithNumber(0)->dock);
wDockDoAutoLaunch(wScreenWithNumber(0)->dock, 0);
}
}

Expand Down
14 changes: 14 additions & 0 deletions Applications/Workspace/WM-PATCHES/src_dock.c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- ./WindowMaker-0.95.7/src/dock.c 2015-08-11 21:41:14.000000000 +0300
+++ ./WindowMaker/src/dock.c 2018-01-22 01:04:41.880317277 +0200
@@ -1959,9 +1959,10 @@
ChangeStackingLevel(aicon->icon->core, WMDockLevel);

wCoreConfigure(aicon->icon->core, aicon->x_pos, aicon->y_pos, 0, 0);
+#ifndef NEXTSPACE
if (!dock->collapsed)
XMapWindow(dpy, aicon->icon->core->window);
-
+#endif
wRaiseFrame(aicon->icon->core);

dock->icon_count++;
18 changes: 18 additions & 0 deletions Applications/Workspace/WM-PATCHES/src_screen.c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--- ./WindowMaker-0.95.7/src/screen.c 2015-08-11 21:41:14.000000000 +0300
+++ ./WindowMaker/src/screen.c 2018-01-22 00:48:54.198616011 +0200
@@ -898,6 +898,7 @@
if (!scr->session_state)
scr->session_state = WMCreatePLDictionary(NULL, NULL);

+#ifndef NEXTSPACE
if (!wPreferences.flags.nodock) {
state = WMGetFromPLDictionary(scr->session_state, dDock);
scr->dock = wDockRestoreState(scr, state, WM_DOCK);
@@ -919,6 +920,7 @@
}
wDrawersRestoreState(scr);
}
+#endif

wWorkspaceRestoreState(scr);
wScreenUpdateUsableArea(scr);
2 changes: 1 addition & 1 deletion Applications/Workspace/WindowMaker/INSTALL-WMAKER
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Copyright (c) 2015 The Window Maker Team.
along with this program, see file COPYING for details.


Published by The Window Maker team on 9 December 2017.
Published by The Window Maker team on 26 December 2017.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion Applications/Workspace/WindowMaker/README.i18n
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Copyright (c) 2015 The Window Maker Team.
along with this program, see file COPYING for details.


Published by The Window Maker team on 9 December 2017.
Published by The Window Maker team on 26 December 2017.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
3 changes: 2 additions & 1 deletion Applications/Workspace/WindowMaker/src/dock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1959,9 +1959,10 @@ WDock *wDockRestoreState(WScreen *scr, WMPropList *dock_state, int type)
ChangeStackingLevel(aicon->icon->core, WMDockLevel);

wCoreConfigure(aicon->icon->core, aicon->x_pos, aicon->y_pos, 0, 0);
#ifndef NEXTSPACE
if (!dock->collapsed)
XMapWindow(dpy, aicon->icon->core->window);

#endif
wRaiseFrame(aicon->icon->core);

dock->icon_count++;
Expand Down
Loading

0 comments on commit 3c0e7c5

Please sign in to comment.