mirror of https://git.code.sf.net/p/gsmwm/code
parent
329418bbe5
commit
21a9399f9d
|
@ -9,6 +9,12 @@
|
|||
* <http://www.gnu.org/licenses/>。
|
||||
**************************************************************************/
|
||||
|
||||
2023年 06月 14日 星期三 00:40:39 CST gsm <406643764@qq.com>
|
||||
* 發布第2.2.5版;
|
||||
* 修復縮微窗口顏色異常的缺陷;
|
||||
* 調整縮微窗口最大寬度;
|
||||
* 調整配色方案。
|
||||
|
||||
2023年 06月 13日 星期二 16:04:07 CST gsm <406643764@qq.com>
|
||||
* 發布第2.2.4版;
|
||||
* 修復在堆疊模式和預覽模式下缺失標題欄按鈕的缺陷;
|
||||
|
|
5
NEWS
5
NEWS
|
@ -9,6 +9,11 @@
|
|||
* <http://www.gnu.org/licenses/>。
|
||||
* ************************************************************************/
|
||||
|
||||
第2.2.5版:
|
||||
* 修復縮微窗口顏色異常的缺陷;
|
||||
* 調整縮微窗口最大寬度;
|
||||
* 調整配色方案。
|
||||
|
||||
第2.2.4版:
|
||||
* 修復在堆疊模式和預覽模式下缺失標題欄按鈕的缺陷;
|
||||
* 調整文字對齊方式、與構件的間距;
|
||||
|
|
3
TODO
3
TODO
|
@ -9,6 +9,9 @@
|
|||
* <http://www.gnu.org/licenses/>。
|
||||
* ************************************************************************/
|
||||
|
||||
第2.2.5版的下一步的開發計劃:
|
||||
* 支持EWMH的_NET_WM_*NAME應用程序窗口特性。
|
||||
|
||||
第2.2.4版的下一步的開發計劃:
|
||||
* 支持EWMH的_NET_WM_*NAME應用程序窗口特性;
|
||||
* 對外觀進行微調。
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
./" program. Otherwise, see <http://www.gnu.org/licenses/>.
|
||||
./" ************************************************* ***************************/
|
||||
|
||||
.TH gwm 1 June 2023 "gwm 2.2.4" gwm
|
||||
.TH gwm 1 June 2023 "gwm 2.2.5" gwm
|
||||
.
|
||||
.SH NAME
|
||||
gwm \- gwm (gsm's window manager), is an X11-based dynamic window manager written in C language.
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
./" <http://www.gnu.org/licenses/>。
|
||||
./" ************************************************************************/
|
||||
|
||||
.TH gwm 1 2023年6月 "gwm 2.2.4" gwm
|
||||
.TH gwm 1 2023年6月 "gwm 2.2.5" gwm
|
||||
.
|
||||
.SH 名称
|
||||
.B
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
./" 你應該已經收到一份附隨此程序的GNU通用公共許可證副本。否則,請參閱
|
||||
./" <http://www.gnu.org/licenses/>。
|
||||
./" ************************************************************************/
|
||||
.TH gwm 1 2023年6月 "gwm 2.2.4" gwm
|
||||
.TH gwm 1 2023年6月 "gwm 2.2.5" gwm
|
||||
.
|
||||
.SH 名稱
|
||||
gwm \- gwm(gsm's window manager),是一個用C語言編寫的基於X11的動態窗口管理器。
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gwm 2.2.4\n"
|
||||
"Project-Id-Version: gwm 2.2.5\n"
|
||||
"Report-Msgid-Bugs-To: 406643764@qq.com\n"
|
||||
"POT-Creation-Date: 2023-06-13 16:05+0800\n"
|
||||
"PO-Revision-Date: 2023-05-05 11:26+0800\n"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gwm 2.2.4\n"
|
||||
"Project-Id-Version: gwm 2.2.5\n"
|
||||
"Report-Msgid-Bugs-To: 406643764@qq.com\n"
|
||||
"POT-Creation-Date: 2023-06-13 16:05+0800\n"
|
||||
"PO-Revision-Date: 2023-05-05 09:56+0800\n"
|
||||
|
|
16
src/config.c
16
src/config.c
|
@ -290,7 +290,7 @@ static void config_widget_size(WM *wm)
|
|||
c->win_gap=c->border_width*2;
|
||||
c->status_area_width_max=c->font_size[TASKBAR_FONT]*30;
|
||||
c->taskbar_button_width=get_font_height_by_pad(wm, TASKBAR_FONT)/0.618+0.5;
|
||||
c->icon_win_width_max=c->font_size[TASKBAR_FONT]*10;
|
||||
c->icon_win_width_max=c->font_size[TASKBAR_FONT]*15;
|
||||
c->icon_gap=c->font_size[TASKBAR_FONT]/2.0+0.5;
|
||||
c->act_center_item_width=c->font_size[ACT_CENTER_FONT]*8;
|
||||
c->run_cmd_entry_width=c->font_size[ACT_CENTER_FONT]*16;
|
||||
|
@ -327,10 +327,10 @@ static void config_cursor_shape(WM *wm)
|
|||
*/
|
||||
static void config_widget_color_for_dark(WM *wm)
|
||||
{
|
||||
SET_WIDGET_COLOR_NAME(wm, DARK_THEME, NORMAL_BORDER_COLOR, "grey31");
|
||||
SET_WIDGET_COLOR_NAME(wm, DARK_THEME, CURRENT_BORDER_COLOR, "grey11");
|
||||
SET_WIDGET_COLOR_NAME(wm, DARK_THEME, NORMAL_TITLEBAR_COLOR, "grey31");
|
||||
SET_WIDGET_COLOR_NAME(wm, DARK_THEME, CURRENT_TITLEBAR_COLOR, "grey11");
|
||||
SET_WIDGET_COLOR_NAME(wm, DARK_THEME, NORMAL_BORDER_COLOR, "grey11");
|
||||
SET_WIDGET_COLOR_NAME(wm, DARK_THEME, CURRENT_BORDER_COLOR, "grey31");
|
||||
SET_WIDGET_COLOR_NAME(wm, DARK_THEME, NORMAL_TITLEBAR_COLOR, "grey11");
|
||||
SET_WIDGET_COLOR_NAME(wm, DARK_THEME, CURRENT_TITLEBAR_COLOR, "grey31");
|
||||
SET_WIDGET_COLOR_NAME(wm, DARK_THEME, ENTERED_NORMAL_BUTTON_COLOR, "DarkOrange");
|
||||
SET_WIDGET_COLOR_NAME(wm, DARK_THEME, ENTERED_CLOSE_BUTTON_COLOR, "red");
|
||||
SET_WIDGET_COLOR_NAME(wm, DARK_THEME, NORMAL_BUTTON_COLOR, "grey21");
|
||||
|
@ -338,7 +338,7 @@ static void config_widget_color_for_dark(WM *wm)
|
|||
SET_WIDGET_COLOR_NAME(wm, DARK_THEME, ACT_CENTER_COLOR, "grey31");
|
||||
SET_WIDGET_COLOR_NAME(wm, DARK_THEME, TASKBAR_COLOR, "grey21");
|
||||
SET_WIDGET_COLOR_NAME(wm, DARK_THEME, ENTRY_COLOR, "white");
|
||||
SET_WIDGET_COLOR_NAME(wm, DARK_THEME, HINT_WIN_COLOR, "grey91");
|
||||
SET_WIDGET_COLOR_NAME(wm, DARK_THEME, HINT_WIN_COLOR, "grey81");
|
||||
SET_WIDGET_COLOR_NAME(wm, DARK_THEME, ROOT_WIN_COLOR, "black");
|
||||
}
|
||||
|
||||
|
@ -395,13 +395,13 @@ static void config_widget_color(WM *wm)
|
|||
*/
|
||||
static void config_text_color_for_dark(WM *wm)
|
||||
{
|
||||
SET_TEXT_COLOR_NAME(wm, DARK_THEME, NORMAL_TITLEBAR_TEXT_COLOR, "grey61");
|
||||
SET_TEXT_COLOR_NAME(wm, DARK_THEME, NORMAL_TITLEBAR_TEXT_COLOR, "grey71");
|
||||
SET_TEXT_COLOR_NAME(wm, DARK_THEME, CURRENT_TITLEBAR_TEXT_COLOR, "LightGreen");
|
||||
SET_TEXT_COLOR_NAME(wm, DARK_THEME, TASKBAR_TEXT_COLOR, "white");
|
||||
SET_TEXT_COLOR_NAME(wm, DARK_THEME, CLASS_TEXT_COLOR, "RosyBrown");
|
||||
SET_TEXT_COLOR_NAME(wm, DARK_THEME, ACT_CENTER_ITEM_TEXT_COLOR, "white");
|
||||
SET_TEXT_COLOR_NAME(wm, DARK_THEME, ENTRY_TEXT_COLOR, "black");
|
||||
SET_TEXT_COLOR_NAME(wm, DARK_THEME, HINT_TEXT_COLOR, "grey41");
|
||||
SET_TEXT_COLOR_NAME(wm, DARK_THEME, HINT_TEXT_COLOR, "SkyBlue4");
|
||||
}
|
||||
|
||||
/* 功能:爲默認顏色主題設置文字顏色。
|
||||
|
|
|
@ -56,17 +56,15 @@ void draw_string(WM *wm, Drawable d, const char *str, const String_format *f)
|
|||
}
|
||||
|
||||
XftDraw *draw=XftDrawCreate(wm->display, d, wm->visual, wm->colormap);
|
||||
const char *es="︙";
|
||||
XftDrawStringUtf8(draw, &f->fg, font, sx, sy, (const FcChar8 *)str, n);
|
||||
if(f->trunc && sw+2*pad>w)
|
||||
{
|
||||
const char *es="︙";
|
||||
int ew, en=strlen(es);
|
||||
get_string_size(wm, font, es, &ew, NULL);
|
||||
XftDrawStringUtf8(draw, &f->fg, font, sx, sy, (const FcChar8 *)str, n);
|
||||
XClearArea(wm->display, d, x+w-ew, 0, ew, h, False);
|
||||
XftDrawStringUtf8(draw, &TEXT_COLOR(wm, HINT), font, x+w-ew, sy, (const FcChar8 *)es, en);
|
||||
}
|
||||
else
|
||||
XftDrawStringUtf8(draw, &f->fg, font, sx, sy, (const FcChar8 *)str, n);
|
||||
XftDrawDestroy(draw);
|
||||
}
|
||||
|
||||
|
|
28
src/icon.c
28
src/icon.c
|
@ -40,6 +40,8 @@ static FILE *open_index_theme(const char *base_dir, const char *theme);
|
|||
static size_t get_spec_char_num(const char *str, int ch);
|
||||
static char **get_parent_themes(const char *base_dir, const char *theme);
|
||||
static bool is_accessible(const char *filename);
|
||||
static bool have_same_class_icon_client(WM *wm, Client *c);
|
||||
|
||||
|
||||
void draw_image(WM *wm, Imlib_Image image, Drawable d, int x, int y, int w, int h)
|
||||
{
|
||||
|
@ -383,17 +385,15 @@ static bool is_accessible(const char *filename)
|
|||
return !stat(filename, &buf);
|
||||
}
|
||||
|
||||
static bool have_same_class_icon_client(WM *wm, Client *c);
|
||||
|
||||
void iconify(WM *wm, Client *c)
|
||||
{
|
||||
c->icon->area_type=c->area_type==ICONIFY_AREA ? wm->cfg->default_area_type : c->area_type;
|
||||
Icon *i=c->icon;
|
||||
|
||||
update_win_bg(wm, i->win, WIDGET_COLOR(wm, TASKBAR), None);
|
||||
i->area_type=c->area_type==ICONIFY_AREA ? wm->cfg->default_area_type : c->area_type;
|
||||
c->area_type=ICONIFY_AREA;
|
||||
c->icon->title_text=get_text_prop(wm, c->win, XA_WM_ICON_NAME);
|
||||
if(!c->icon->title_text)
|
||||
c->icon->title_text=copy_string(c->title_text);
|
||||
update_icon_area(wm);
|
||||
XMapWindow(wm->display, c->icon->win);
|
||||
XMapWindow(wm->display, i->win);
|
||||
XUnmapWindow(wm->display, c->frame);
|
||||
if(c == DESKTOP(wm)->cur_focus_client)
|
||||
{
|
||||
|
@ -405,8 +405,11 @@ void iconify(WM *wm, Client *c)
|
|||
void create_icon(WM *wm, Client *c)
|
||||
{
|
||||
Icon *i=c->icon=malloc_s(sizeof(Icon));
|
||||
i->x=0, i->y=0, i->w=i->h=wm->taskbar->h, i->title_text=NULL;
|
||||
i->win=XCreateSimpleWindow(wm->display, wm->taskbar->icon_area, i->x, i->y,
|
||||
i->x=i->y=0, i->w=i->h=wm->taskbar->h;
|
||||
i->title_text=get_text_prop(wm, c->win, XA_WM_ICON_NAME);
|
||||
if(!i->title_text)
|
||||
i->title_text=copy_string(c->title_text);
|
||||
i->win=XCreateSimpleWindow(wm->display, wm->taskbar->icon_area, 0, 0,
|
||||
i->w, i->h, 0, 0, WIDGET_COLOR(wm, TASKBAR));
|
||||
XSelectInput(wm->display, c->icon->win, ICON_WIN_EVENT_MASK);
|
||||
set_icon_image(wm, c);
|
||||
|
@ -459,15 +462,18 @@ void deiconify(WM *wm, Client *c)
|
|||
|
||||
void del_icon(WM *wm, Client *c)
|
||||
{
|
||||
XDestroyWindow(wm->display, c->icon->win);
|
||||
c->area_type=c->icon->area_type;
|
||||
if(c->icon->image)
|
||||
{
|
||||
imlib_context_set_image(c->icon->image);
|
||||
imlib_free_image();
|
||||
}
|
||||
if(c->area_type == ICONIFY_AREA)
|
||||
{
|
||||
XDestroyWindow(wm->display, c->icon->win);
|
||||
c->area_type=c->icon->area_type;
|
||||
vfree(c->icon->title_text, c->icon, NULL);
|
||||
update_icon_area(wm);
|
||||
}
|
||||
}
|
||||
|
||||
void iconify_all_clients(WM *wm)
|
||||
|
|
|
@ -132,9 +132,8 @@ void update_client_icon_win(WM *wm, Window win)
|
|||
if(i->show_text)
|
||||
{
|
||||
String_format f={{wm->taskbar->h, 0, i->w-wm->taskbar->h, i->h},
|
||||
CENTER_LEFT, true, true, false, 0, c==CUR_FOC_CLI(wm) ?
|
||||
TEXT_COLOR(wm, CURRENT_TITLEBAR)
|
||||
: TEXT_COLOR(wm, NORMAL_TITLEBAR), TITLEBAR_FONT};
|
||||
CENTER, true, false, false, 0,
|
||||
TEXT_COLOR(wm, TASKBAR), TASKBAR_FONT};
|
||||
draw_string(wm, i->win, i->title_text, &f);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue