Merge branch 'master' into scroll-bar-theme-improvements

This commit is contained in:
Morgan Aldridge 2021-03-17 15:27:52 -04:00
commit e822ec57b9
6 changed files with 60 additions and 49 deletions

View File

@ -1,5 +1,6 @@
0.9.2 -> 0.9.3 0.9.2 -> 0.9.3
Fix RestartSystem()/Done() to correctly restart into other window managers Fix RestartSystem()/Done() to correctly restart into other window managers
Add RoundedScreenCorners configuration
0.9.1 -> 0.9.2 0.9.1 -> 0.9.2
Change sprintf() & strcat() to snprintf() Change sprintf() & strcat() to snprintf()

View File

@ -151,6 +151,8 @@ It turns on FollowToMouse with the modification of not loosing
focus when in the root window. focus when in the root window.
.IP "\fBSystem8\fP" .IP "\fBSystem8\fP"
Change to window decoration to System 8(Only Color Monitor). Change to window decoration to System 8(Only Color Monitor).
.IP "\fBRoundedScreenCorners\fP"
Enable rounded screen corners.
.IP "\fBOpaqueMove\fP" .IP "\fBOpaqueMove\fP"
Enable Opaque move. Enable Opaque move.
.IP "\fBOpaqueResize\fP" .IP "\fBOpaqueResize\fP"

View File

@ -496,6 +496,8 @@ void SetTitleBar( MlvwmWindow *t, Bool on_off )
else else
XDrawLine( dpy, t->title_w, Scr.Gray1GC, 0, lp, t->frame_w, lp ); XDrawLine( dpy, t->title_w, Scr.Gray1GC, 0, lp, t->frame_w, lp );
} }
else
XDrawLine( dpy, t->title_w, Scr.BlackGC, 0, lp, t->frame_w, lp );
} }
if( Scr.flags&SYSTEM8 ){ if( Scr.flags&SYSTEM8 ){

View File

@ -713,6 +713,11 @@ void SetEdgeResist( char *line, FILE *fp )
} }
} }
void SetRoundedCorners( char *line, FILE *fp )
{
Scr.flags |= ROUNDEDCORNERS;
}
config_func main_config[]={ config_func main_config[]={
{ "Desktopnum", SetDeskTopNum }, { "Desktopnum", SetDeskTopNum },
{ "DoubleClickTime", SetDoubleClickTime }, { "DoubleClickTime", SetDoubleClickTime },
@ -734,6 +739,7 @@ config_func main_config[]={
{ "Menu", SetMenu}, { "Menu", SetMenu},
{ "Read", ReadNewConfigFile }, { "Read", ReadNewConfigFile },
{ "RestartPreviousState", SetRstPrevState }, { "RestartPreviousState", SetRstPrevState },
{ "RoundedScreenCorners", SetRoundedCorners },
{ "ScrollBarWidth", SetBarWidth }, { "ScrollBarWidth", SetBarWidth },
{ "ShadeMap", SetShadeMap }, { "ShadeMap", SetShadeMap },
{ "ShortCut", SetShortCut }, { "ShortCut", SetShortCut },

View File

@ -120,6 +120,7 @@ void RedrawMenuBar( void )
if( Scr.flags&SYSTEM8 ) if( Scr.flags&SYSTEM8 )
DrawShadowBox( 0, 0, Scr.MyDisplayWidth, MENUB_H, Scr.MenuBar, 1, DrawShadowBox( 0, 0, Scr.MyDisplayWidth, MENUB_H, Scr.MenuBar, 1,
Scr.WhiteGC, Scr.Gray1GC, SHADOW_ALL ); Scr.WhiteGC, Scr.Gray1GC, SHADOW_ALL );
if(Scr.flags&ROUNDEDCORNERS){
XFillRectangle( dpy, Scr.MenuBar, Scr.BlackGC, 0, 0, 7, 7 ); XFillRectangle( dpy, Scr.MenuBar, Scr.BlackGC, 0, 0, 7, 7 );
XFillRectangle( dpy, Scr.MenuBar, XFillRectangle( dpy, Scr.MenuBar,
Scr.BlackGC, Scr.MyDisplayWidth-7, 0, 7, 7 ); Scr.BlackGC, Scr.MyDisplayWidth-7, 0, 7, 7 );
@ -141,6 +142,10 @@ void RedrawMenuBar( void )
XFillArc( dpy, Scr.MenuBar, Scr.WhiteGC, Scr.MyDisplayWidth-15, 0, XFillArc( dpy, Scr.MenuBar, Scr.WhiteGC, Scr.MyDisplayWidth-15, 0,
14, 14, 0, 90*64 ); 14, 14, 0, 90*64 );
} }
XMapWindow( dpy, Scr.lbCorner );
XMapWindow( dpy, Scr.rbCorner );
}
if( !(Scr.flags&SYSTEM8) ) if( !(Scr.flags&SYSTEM8) )
XDrawLine( dpy, Scr.MenuBar, Scr.BlackGC, XDrawLine( dpy, Scr.MenuBar, Scr.BlackGC,
0, MENUB_H-1, Scr.MyDisplayWidth, MENUB_H-1 ); 0, MENUB_H-1, Scr.MyDisplayWidth, MENUB_H-1 );
@ -1294,28 +1299,24 @@ Window PixmapWin (char **data_xpm, Window root, int x, int y)
void CreateMenuBar( void ) void CreateMenuBar( void )
{ {
static char *lbot_xpm[] = { static char *lbot_xpm[] = {
"7 7 2 1", "5 5 2 1",
" c none s none", " c none s none",
"# c black", "# c black",
"# ", "# ",
"# ", "# ",
"# ",
"## ", "## ",
"### ", "### ",
"#### ", "#####"
"#######"
}; };
static char *rbot_xpm[] = { static char *rbot_xpm[] = {
"7 7 2 1", "5 5 2 1",
" c none s none", " c none s none",
"# c black", "# c black",
" #", " #",
" #", " #",
" #",
" ##", " ##",
" ###", " ###",
" ####", "#####"
"#######"
}; };
unsigned long valuemask; unsigned long valuemask;
XSetWindowAttributes attributes; XSetWindowAttributes attributes;
@ -1332,10 +1333,8 @@ void CreateMenuBar( void )
valuemask, &attributes ); valuemask, &attributes );
XMapWindow( dpy, Scr.MenuBar ); XMapWindow( dpy, Scr.MenuBar );
Scr.lbCorner = PixmapWin( lbot_xpm, Scr.Root, 0, -1 ); Scr.lbCorner = PixmapWin( lbot_xpm, Scr.Root, 0, -1 );
XMapWindow( dpy, Scr.lbCorner );
Scr.rbCorner = PixmapWin( rbot_xpm, Scr.Root, -1, -1 ); Scr.rbCorner = PixmapWin( rbot_xpm, Scr.Root, -1, -1 );
XMapWindow( dpy, Scr.rbCorner );
RedrawMenuBar( ); RedrawMenuBar( );
} }

View File

@ -141,6 +141,7 @@ typedef struct ScreenInfo
#define OPAQUERESIZE 0x00008000 #define OPAQUERESIZE 0x00008000
#define ONECLICKMENU 0x00010000 #define ONECLICKMENU 0x00010000
#define DEBUGOUT 0x00020000 #define DEBUGOUT 0x00020000
#define ROUNDEDCORNERS 0x00040000
#ifdef USE_LOCALE #ifdef USE_LOCALE
#define MENUBARFONT Scr.MenuBarFs #define MENUBARFONT Scr.MenuBarFs