1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-07-10 12:46:36 +02:00

Compare commits

...

16 Commits

Author SHA1 Message Date
David Maciejak 157d1ba85f Fix internal function name typo
The patch is to fix a typo in the fct name movePionterToWindowCenter
2023-03-23 12:57:58 +00:00
David Maciejak 91e7f37074 WPrefs: fix keyboard shortcut sorting order
That patch is fixing some Actions entries that are not sorted properly.
One is using some upper/lower cases.
And the other one, is displaying numbers while alphabetic sorting is not
working properly on numbers. For example:
Shortcut for window 1
Shortcut for window 10
Shortcut for window 2
...
2023-03-21 15:20:19 +00:00
David Maciejak 18a539b372 Add some more cases to handle window unusual size request
As discussed on the ML, the test to check for CARD16 limit is probably innacurate.
Check instead for maxH and maxW which are set by default to twice the size
of the screen or to the max values passed by the window normal hints property.
2023-03-16 15:02:18 +00:00
David Maciejak eae9200c5d Fix ICCM ConfigureNotify request
According to ICCM specs at [1]

*Not changing the size, location, border width, or stacking order of the window at all.
A client will receive a synthetic ConfigureNotify event that describes the (unchanged)
geometry of the window. The (x,y) coordinates will be in the root coordinate system,
adjusted for the border width the client requested, irrespective of any reparenting
that has taken place. The border_width will be the border width the client requested.
The client will not receive a real ConfigureNotify event because no change has actually
taken place.

*Moving or restacking the window without resizing it or changing its border width.
A client will receive a synthetic ConfigureNotify event following the change that
describes the new geometry of the window. The event's (x,y) coordinates will be in
the root coordinate system adjusted for the border width the client requested.
The border_width will be the border width the client requested. The client may not
receive a real ConfigureNotify event that describes this change because the window
manager may have reparented the top-level window. If the client does receive a
real event, the synthetic event will follow the real one.

*Resizing the window or changing its border width
(regardless of whether the window was also moved or restacked).
A client that has selected for StructureNotify events will receive a real
ConfigureNotify event.
Note that the coordinates in this event are relative to the parent,
which may not be the root if the window has been reparented. The coordinates will
reflect the actual border width of the window (which the window manager may have
changed). The TranslateCoordinates request can be used to convert the coordinates
if required.

In Window Maker, the first case is not implemented: doing a synthetic ConfigureNotify
to notify no changes were done. That's creating some issues with app like Citrix icaclient
when sometime windows are blank and need to be moved to be refreshed.

[1]https://x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html#configuring_the_window
2023-03-16 15:02:18 +00:00
David Maciejak 25cb9d208a Update window.c copyright
Just updating the copyright line in the file header.
2023-03-16 15:02:18 +00:00
David Maciejak 23471b2e21 WPrefs: update maximization feature descriptions
Align the old maximization descriptions to the new visual indicator
names. The internal shortcut names had also been updated, meaning a
reconfiguration of the shortcuts in WPrefs is required.
2023-03-16 11:36:02 +00:00
David Maciejak 258ffc8b97 Window menu: add maximization visual indicators
Add visual indicators for the maximization options in the window menu.
2023-03-14 12:27:16 +00:00
David Maciejak 86b7ec1a58 Restore proper drawer direction when screen was resized
Since 48d4820dee the dock is positioned
dynamically based on the screen midpoint.
The side issue using such method is if in case the screen was temporarily
resized the dock as a chance to be displayed on the other side making
the drawer saved configuration from WMState esp the direction wrong when
wm is started again.
For example, the dock and drawer are displayed on the right of the screen.
Then the screen resolution is downsized temporaily to half or less of
the previous size. The position stored in WMState will be updated and the
direction of the drawer is still opening on the left.
But on next wm start, when reading the conf.
The position of the dock and drawer are corresponding to the
middle or less of the unresized screen. The dock and drawer will be sticked
on the left. But the drawer direction was not updated and still opening
on the left (which is out of the screen).
2023-03-14 12:27:16 +00:00
Doug Torrance 9831e3f72a Move declarations to beginning of switch statements
Several variable declarations were recently added immediately after
labels, but this causes compile errors in GCC versions prior to 11,
e.g.,

    wsmap.c: In function ‘handle_event’:
    wsmap.c:534:4: error: a label can only be part of a statement and a declaration is not a statement
      534 |    WMScreen *wmscr = wsmap->scr->wmscreen;
          |    ^~~~~~~~

We move these declarations to the top of the corresponding switch
statements so that Window Maker can compile on these older versions of
GCC.
2023-03-13 15:33:21 +00:00
David Maciejak 0a55facac0 wmiv: align version with wm
Use wm version for the wmiv util.
2023-03-13 15:32:19 +00:00
David Maciejak 0ecf7d3540 KeepDockOnPrimaryHead: fix drawer direction
When that option is on, swapping drawer does not always mean
swapping drawer direction. For example if drawer is on the left
side of the second head and moving to the left side of the first head,
the direction should be the same.
2023-03-13 15:32:19 +00:00
David Maciejak 4576b5bf1e Info Panel: display proper number of colors in deepcolor env
Instead of displaying a number of unitary colors in 10bit env,
display a more human readable message.
2023-03-13 15:32:19 +00:00
David Maciejak 0526ddfc54 WINGs: Make the Extras examples to compile
There is a table view example which is not compiling cause
of a missing lib, also fixed some warnings.
2023-03-12 09:44:10 +00:00
David Maciejak 4c52232ee7 Window titlebar double click to unmaximize
Commit 6e2075f3df from 2020 added
a feature to maximize window when double clicking on the titlebar.
But unmaximizing is not supported so when double clicking again
on the window titlebar the window geometry was not reverted back.
2023-03-12 09:44:10 +00:00
David Maciejak 43edd37ee2 Update file headers year copyright
Update copyright year for Window Maker Team entries.
2023-03-12 09:44:10 +00:00
David Maciejak e95aea2e30 Workspace pager: display ? on non visited mini workspace
When the workspace pager is displayed it's showing grey mini workspaces
for non rendered/non visited workspaces. That patch is adding an exclamation
mark in the middle of the dummy grey background mini workspaces.
2023-03-11 11:38:25 +00:00
43 changed files with 346 additions and 193 deletions
+3 -3
View File
@@ -10,7 +10,7 @@ include_HEADERS = wtableview.h wtabledelegates.h
lib_LTLIBRARIES = libExtraWINGs.la lib_LTLIBRARIES = libExtraWINGs.la
noinst_PROGRAMS = test noinst_PROGRAMS = tableview
EXTRA_DIST = EXTRA_DIST =
@@ -25,6 +25,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs \
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \ LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
$(top_builddir)/WINGs/libWUtil.la \ $(top_builddir)/WINGs/libWUtil.la \
@XFT_LIBS@ @INTLIBS@ @XFT_LIBS@ @INTLIBS@ @XLIBS@
test_LDADD = wtableview.o wtabledelegates.o $(LDADD) tableview_LDADD = wtableview.o wtabledelegates.o $(LDADD)
@@ -19,13 +19,18 @@ static char *options[] = {
int numberOfRows(WMTableViewDelegate * self, WMTableView * table) int numberOfRows(WMTableViewDelegate * self, WMTableView * table)
{ {
(void) self;
(void) table;
return 20; return 20;
} }
void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row) void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row)
{ {
(void) self;
/*WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column); */ /*WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column); */
int i; int i;
if (col1[0] == 0) { if (col1[0] == 0) {
for (i = 0; i < 20; i++) { for (i = 0; i < 20; i++) {
char buf[128]; char buf[128];
@@ -44,6 +49,8 @@ void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row)
void setValueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row, void *data) void setValueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row, void *data)
{ {
(void) self;
if ((uintptr_t)WMGetTableColumnId(column) == 1) if ((uintptr_t)WMGetTableColumnId(column) == 1)
col1[row] = data; col1[row] = data;
else else
@@ -59,6 +66,7 @@ static WMTableViewDelegate delegate = {
void clickedTable(WMWidget * w, void *self) void clickedTable(WMWidget * w, void *self)
{ {
(void) w;
int row = WMGetTableViewClickedRow((WMTableView *) self); int row = WMGetTableViewClickedRow((WMTableView *) self);
WMEditTableViewRow(self, row); WMEditTableViewRow(self, row);
+14 -8
View File
@@ -2,6 +2,8 @@
#include <WINGs/WINGsP.h> #include <WINGs/WINGsP.h>
#include <X11/cursorfont.h> #include <X11/cursorfont.h>
#include <stdint.h> #include <stdint.h>
#include <math.h>
#include <float.h>
#include "wtableview.h" #include "wtableview.h"
@@ -274,7 +276,7 @@ static void adjustScrollers(WMTableView * table)
prop = 1.0; prop = 1.0;
} else { } else {
oprop = WMGetScrollerKnobProportion(table->hscroll); oprop = WMGetScrollerKnobProportion(table->hscroll);
if (oprop == 0.0) if (fabs(oprop) <= DBL_EPSILON)
oprop = 1.0; oprop = 1.0;
ovalue = WMGetScrollerValue(table->hscroll); ovalue = WMGetScrollerValue(table->hscroll);
@@ -290,7 +292,7 @@ static void adjustScrollers(WMTableView * table)
prop = 1.0; prop = 1.0;
} else { } else {
oprop = WMGetScrollerKnobProportion(table->vscroll); oprop = WMGetScrollerKnobProportion(table->vscroll);
if (oprop == 0.0) if (fabs(oprop) <= DBL_EPSILON)
oprop = 1.0; oprop = 1.0;
ovalue = WMGetScrollerValue(table->vscroll); ovalue = WMGetScrollerValue(table->vscroll);
@@ -332,7 +334,7 @@ static void doScroll(WMWidget * self, void *data)
case WSIncrementWheel: case WSIncrementWheel:
case WSIncrementLine: case WSIncrementLine:
value += (float)table->rowHeight / size; value += (float)table->rowHeight / size;
if (value > 1.0) if (value > (float)1.0)
value = 1.0; value = 1.0;
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self)); WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
repaintTable(table); repaintTable(table);
@@ -344,7 +346,7 @@ static void doScroll(WMWidget * self, void *data)
case WSDecrementPage: case WSDecrementPage:
value -= vpsize / size; value -= vpsize / size;
if (value < 0.0) if (value < (float)0.0)
value = 0.0; value = 0.0;
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self)); WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
repaintTable(table); repaintTable(table);
@@ -352,7 +354,7 @@ static void doScroll(WMWidget * self, void *data)
case WSIncrementPage: case WSIncrementPage:
value += vpsize / size; value += vpsize / size;
if (value > 1.0) if (value > (float)1.0)
value = 1.0; value = 1.0;
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self)); WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
repaintTable(table); repaintTable(table);
@@ -398,6 +400,7 @@ static void doScroll(WMWidget * self, void *data)
static void splitterHandler(XEvent * event, void *data) static void splitterHandler(XEvent * event, void *data)
{ {
(void) event;
WMTableColumn *column = (WMTableColumn *) data; WMTableColumn *column = (WMTableColumn *) data;
WMTableView *table = column->table; WMTableView *table = column->table;
int done = 0; int done = 0;
@@ -451,6 +454,8 @@ static void splitterHandler(XEvent * event, void *data)
static void realizeTable(void *data, WMNotification * notif) static void realizeTable(void *data, WMNotification * notif)
{ {
(void) notif;
repaintTable(data); repaintTable(data);
} }
@@ -790,7 +795,6 @@ void WMSetTableViewRowHeight(WMTableView * table, int height)
void WMScrollTableViewRowToVisible(WMTableView * table, int row) void WMScrollTableViewRowToVisible(WMTableView * table, int row)
{ {
WMScroller *scroller;
WMRange range; WMRange range;
WMRect rect; WMRect rect;
int newY, tmp; int newY, tmp;
@@ -798,7 +802,6 @@ void WMScrollTableViewRowToVisible(WMTableView * table, int row)
rect = getVisibleRect(table); rect = getVisibleRect(table);
range = rowsInRect(table, rect); range = rowsInRect(table, rect);
scroller = table->vscroll;
if (row < range.position) { if (row < range.position) {
newY = row * table->rowHeight - rect.size.height / 2; newY = row * table->rowHeight - rect.size.height / 2;
@@ -1157,6 +1160,8 @@ static void handleEvents(XEvent * event, void *data)
static void handleResize(W_ViewDelegate * self, WMView * view) static void handleResize(W_ViewDelegate * self, WMView * view)
{ {
(void) self;
reorganizeInterior(view->self); reorganizeInterior(view->self);
} }
@@ -1167,7 +1172,8 @@ static void reorganizeInterior(WMTableView * table)
WMSize size = getTotalSize(table); WMSize size = getTotalSize(table);
WMView *view = table->view; WMView *view = table->view;
int vw, vh; int vw, vh;
int hsThickness, vsThickness; int hsThickness = 0;
int vsThickness = 0;
if (table->vscroll) if (table->vscroll)
vsThickness = WMWidgetWidth(table->vscroll); vsThickness = WMWidgetWidth(table->vscroll);
+1 -1
View File
@@ -1,5 +1,5 @@
# Translation into Western Frisian for Window Maker # Translation into Western Frisian for Window Maker
# Copyright (C) 2015-2016 Window Maker Developers Team # Copyright (C) 2015-2019 Window Maker Developers Team
# This file is distributed under the same license as the windowmaker package. # This file is distributed under the same license as the windowmaker package.
# Original by Alwin <translations@ziggo.nl>, 2015. # Original by Alwin <translations@ziggo.nl>, 2015.
# #
+1 -1
View File
@@ -1,5 +1,5 @@
# New translation into Dutch for Window Maker # New translation into Dutch for Window Maker
# Copyright (C) 2014-2015 Window Maker Developers Team # Copyright (C) 2014-2019 Window Maker Developers Team
# This file is distributed under the same license as the windowmaker package. # This file is distributed under the same license as the windowmaker package.
# Original by Alwin <translations@ziggo.nl>, 2014. # Original by Alwin <translations@ziggo.nl>, 2014.
# #
+5 -4
View File
@@ -2,8 +2,9 @@
* *
* WPrefs - Window Maker Preferences Program * WPrefs - Window Maker Preferences Program
* *
* Copyright (c) 2014 Window Maker Team * Copyright (c) 2014-2023 Window Maker Team
* Copyright (c) 1998-2003 Alfredo K. Kojima * Copyright (c) 1998-2003 Alfredo K. Kojima
* Copyright (c) 2009-2023 Window Maker Team
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -88,7 +89,7 @@ static struct expert_option {
/* default: */ False, OPTION_WMAKER, "KbdModeLock" }, /* default: */ False, OPTION_WMAKER, "KbdModeLock" },
#endif /* XKB_MODELOCK */ #endif /* XKB_MODELOCK */
{ N_("Maximize (snap) a window to edge or corner by dragging."), { N_("Snap a window to edge or corner by dragging."),
/* default: */ False, OPTION_WMAKER, "WindowSnapping" }, /* default: */ False, OPTION_WMAKER, "WindowSnapping" },
{ N_("Distance from edge to begin window snap."), { N_("Distance from edge to begin window snap."),
@@ -97,7 +98,7 @@ static struct expert_option {
{ N_("Distance from corner to begin window snap."), { N_("Distance from corner to begin window snap."),
/* default: */ 10, OPTION_WMAKER_INT, "SnapCornerDetect" }, /* default: */ 10, OPTION_WMAKER_INT, "SnapCornerDetect" },
{ N_("Snapping a window to the top maximizes it to the full screen."), { N_("Snap a window to the top to maximize it to the full screen."),
/* default: */ False, OPTION_WMAKER, "SnapToTopMaximizesFullscreen" }, /* default: */ False, OPTION_WMAKER, "SnapToTopMaximizesFullscreen" },
{ N_("Allow move half-maximized windows between multiple screens."), { N_("Allow move half-maximized windows between multiple screens."),
@@ -115,7 +116,7 @@ static struct expert_option {
{ N_("Wrap dock-attached icons around the screen edges."), { N_("Wrap dock-attached icons around the screen edges."),
/* default: */ True, OPTION_WMAKER, "WrapAppiconsInDock" }, /* default: */ True, OPTION_WMAKER, "WrapAppiconsInDock" },
{ N_("Double click on titlebar maximize a window to full screen."), { N_("Double click on titlebar maximizes/minimizes a window to/from full screen."),
/* default: */ False, OPTION_WMAKER, "DbClickFullScreen" }, /* default: */ False, OPTION_WMAKER, "DbClickFullScreen" },
{ N_("Close rootmenu when mouse (left or right) is clicked outside focus."), { N_("Close rootmenu when mouse (left or right) is clicked outside focus."),
+7 -7
View File
@@ -84,11 +84,11 @@ static struct keyOption {
{ "RHMaximizeKey", N_("Maximize active window right half") }, { "RHMaximizeKey", N_("Maximize active window right half") },
{ "THMaximizeKey", N_("Maximize active window top half") }, { "THMaximizeKey", N_("Maximize active window top half") },
{ "BHMaximizeKey", N_("Maximize active window bottom half") }, { "BHMaximizeKey", N_("Maximize active window bottom half") },
{ "LTCMaximizeKey", N_("Maximize active window left top corner") }, { "TLCMaximizeKey", N_("Maximize active window top left corner") },
{ "RTCMaximizeKey", N_("Maximize active window right top corner") }, { "TRCMaximizeKey", N_("Maximize active window top right corner") },
{ "LBCMaximizeKey", N_("Maximize active window left bottom corner") }, { "BLCMaximizeKey", N_("Maximize active window bottom left corner") },
{ "RBCMaximizeKey", N_("Maximize active window right bottom corner") }, { "BRCMaximizeKey", N_("Maximize active window bottom right corner") },
{ "MaximusKey", N_("Maximus: Tiled maximization ") }, { "MaximusKey", N_("Tile active window") },
{ "KeepOnTopKey", N_("Toggle window on top status") }, { "KeepOnTopKey", N_("Toggle window on top status") },
{ "KeepAtBottomKey",N_("Toggle window at bottom status") }, { "KeepAtBottomKey",N_("Toggle window at bottom status") },
{ "OmnipresentKey", N_("Toggle window omnipresent status") }, { "OmnipresentKey", N_("Toggle window omnipresent status") },
@@ -154,7 +154,7 @@ static struct keyOption {
/* Misc. */ /* Misc. */
{ "WindowRelaunchKey", N_("Launch new instance of application") }, { "WindowRelaunchKey", N_("Launch new instance of application") },
{ "ScreenSwitchKey", N_("Switch to Next Screen/Monitor") }, { "ScreenSwitchKey", N_("Switch to next screen/monitor") },
{ "RunKey", N_("Run application") }, { "RunKey", N_("Run application") },
{ "ExitKey", N_("Exit Window Maker") }, { "ExitKey", N_("Exit Window Maker") },
{ "DockRaiseLowerKey", N_("Raise/Lower Dock") }, { "DockRaiseLowerKey", N_("Raise/Lower Dock") },
@@ -550,7 +550,7 @@ static int cmpKeyOptions(const void *v1, const void *v2)
const struct keyOption *opt1 = (struct keyOption *)v1; const struct keyOption *opt1 = (struct keyOption *)v1;
const struct keyOption *opt2 = (struct keyOption *)v2; const struct keyOption *opt2 = (struct keyOption *)v2;
if ((rc = strcmp(opt1->title, opt2->title)) < 0) if ((rc = strncmp(opt1->title, opt2->title, 20)) < 0)
return -1; return -1;
else if (rc > 0) else if (rc > 0)
return 1; return 1;
+4 -4
View File
@@ -171,10 +171,10 @@
RHMaximizeKey = None; RHMaximizeKey = None;
THMaximizeKey = None; THMaximizeKey = None;
BHMaximizeKey = None; BHMaximizeKey = None;
LTCMaximizeKey = None; TLCMaximizeKey = None;
RTCMaximizeKey = None; TRCMaximizeKey = None;
LBCMaximizeKey = None; BLCMaximizeKey = None;
RBCMaximizeKey = None; BRCMaximizeKey = None;
MaximusKey = None; MaximusKey = None;
KeepOnTopKey = None; KeepOnTopKey = None;
KeepAtBottomKey = None; KeepAtBottomKey = None;
+1 -1
View File
@@ -2,7 +2,7 @@ dnl ============================================================================
dnl dnl
dnl Window Maker autoconf input dnl Window Maker autoconf input
dnl dnl
AC_COPYRIGHT([Copyright (c) 2001-2015 The Window Maker Team]) AC_COPYRIGHT([Copyright (c) 2001-2023 The Window Maker Team])
dnl dnl
dnl ============================================================================ dnl ============================================================================
dnl dnl
+1 -1
View File
@@ -1,7 +1,7 @@
# wm_i18n.m4 - Macros to check and enable translations in WindowMaker # wm_i18n.m4 - Macros to check and enable translations in WindowMaker
# #
# Copyright (c) 2014-2015 Christophe CURIS # Copyright (c) 2014-2015 Christophe CURIS
# Copyright (c) 2015 The Window Maker Tean # Copyright (c) 2015-2021 The Window Maker Tean
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
# wm_libexif.m4 - Macros to check proper libexif # wm_libexif.m4 - Macros to check proper libexif
# #
# Copyright (c) 2014 Window Maker Team # Copyright (c) 2014-2015 Window Maker Team
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,5 +1,5 @@
# Translation into Western Frisian for Window Maker # Translation into Western Frisian for Window Maker
# Copyright (C) 2015-2016 Window Maker Developers Team # Copyright (C) 2015-2020 Window Maker Developers Team
# This file is distributed under the same license as the windowmaker package. # This file is distributed under the same license as the windowmaker package.
# Original by Alwin <translations@ziggo.nl>, 2015. # Original by Alwin <translations@ziggo.nl>, 2015.
# #
+1 -1
View File
@@ -1,5 +1,5 @@
# New translation into Dutch for Window Maker # New translation into Dutch for Window Maker
# Copyright (C) 2014-2016 Window Maker Developers Team # Copyright (C) 2014-2020 Window Maker Developers Team
# This file is distributed under the same license as the windowmaker package. # This file is distributed under the same license as the windowmaker package.
# Original by Alwin <translations@ziggo.nl>, 2014. # Original by Alwin <translations@ziggo.nl>, 2014.
# #
+1 -1
View File
@@ -4,7 +4,7 @@
# Window Maker window manager # Window Maker window manager
# #
# Copyright (c) 2014 Christophe CURIS # Copyright (c) 2014 Christophe CURIS
# Copyright (c) 2014 Window Maker Team # Copyright (c) 2014-2015 Window Maker Team
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -4,7 +4,7 @@
# Window Maker window manager # Window Maker window manager
# #
# Copyright (c) 2014-2015 Christophe CURIS # Copyright (c) 2014-2015 Christophe CURIS
# Copyright (c) 2015 Window Maker Team # Copyright (c) 2015-2019 Window Maker Team
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -2,7 +2,7 @@
* Window Maker window manager * Window Maker window manager
* *
* Copyright (c) 1997-2003 Alfredo K. Kojima * Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 2014 Window Maker Team * Copyright (c) 2014-2023 Window Maker Team
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
+2 -2
View File
@@ -4,7 +4,7 @@
* *
* Copyright (c) 1997-2003 Alfredo K. Kojima * Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 1998-2003 Dan Pascu * Copyright (c) 1998-2003 Dan Pascu
* Copyright (c) 2014 Window Maker Team * Copyright (c) 2014-2023 Window Maker Team
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -2215,7 +2215,7 @@ void wMakeWindowVisible(WWindow *wwin)
} }
} }
void movePionterToWindowCenter(WWindow *wwin) void movePointerToWindowCenter(WWindow *wwin)
{ {
if (!wPreferences.pointer_with_half_max_windows) if (!wPreferences.pointer_with_half_max_windows)
return; return;
+1 -1
View File
@@ -84,7 +84,7 @@ void wUnfullscreenWindow(WWindow *wwin);
void animateResize(WScreen *scr, int x, int y, int w, int h, int fx, int fy, int fw, int fh); void animateResize(WScreen *scr, int x, int y, int w, int h, int fx, int fy, int fw, int fh);
void update_saved_geometry(WWindow *wwin); void update_saved_geometry(WWindow *wwin);
void movePionterToWindowCenter(WWindow *wwin); void movePointerToWindowCenter(WWindow *wwin);
void moveBetweenHeads(WWindow *wwin, int direction); void moveBetweenHeads(WWindow *wwin, int direction);
#endif #endif
+1 -1
View File
@@ -2,7 +2,7 @@
* Window Maker window manager * Window Maker window manager
* *
* Copyright (c) 1998-2003 Alfredo K. Kojima * Copyright (c) 1998-2003 Alfredo K. Kojima
* Copyright (c) 2014 Window Maker Team * Copyright (c) 2014-2016 Window Maker Team
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
+45
View File
@@ -25,7 +25,52 @@ static unsigned char MENU_SHADE_INDICATOR_XBM_DATA[] = {
0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#define MENU_SNAP_INDICATOR_W_XBM_SIZE 10
#define MENU_SNAP_INDICATOR_H_XBM_SIZE 9
static unsigned char MENU_SNAP_V_INDICATOR_XBM_DATA[] = {
0xff, 0x03, 0x1d, 0x02, 0x1d, 0x02, 0x1d, 0x02, 0x1d, 0x02, 0x1d, 0x02,
0x1d, 0x02, 0x1d, 0x02, 0xff, 0x03 };
static unsigned char MENU_SNAP_H_INDICATOR_XBM_DATA[] = {
0xff, 0x03, 0x01, 0x02, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0xff, 0x03 };
static unsigned char MENU_SNAP_RH_INDICATOR_XBM_DATA[] = {
0xff, 0x03, 0x01, 0x02, 0xe1, 0x02, 0xe1, 0x02, 0xe1, 0x02, 0xe1, 0x02,
0xe1, 0x02, 0x01, 0x02, 0xff, 0x03 };
static unsigned char MENU_SNAP_LH_INDICATOR_XBM_DATA[] = {
0xff, 0x03, 0x01, 0x02, 0x1d, 0x02, 0x1d, 0x02, 0x1d, 0x02, 0x1d, 0x02,
0x1d, 0x02, 0x01, 0x02, 0xff, 0x03 };
static unsigned char MENU_SNAP_TH_INDICATOR_XBM_DATA[] = {
0xff, 0x03, 0x01, 0x02, 0xfd, 0x02, 0xfd, 0x02, 0xfd, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0xff, 0x03 };
static unsigned char MENU_SNAP_BH_INDICATOR_XBM_DATA[] = {
0xff, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xfd, 0x02, 0xfd, 0x02,
0xfd, 0x02, 0x01, 0x02, 0xff, 0x03 };
static unsigned char MENU_SNAP_TL_INDICATOR_XBM_DATA[] = {
0xff, 0x03, 0x1f, 0x02, 0x1f, 0x02, 0x1f, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0xff, 0x03 };
static unsigned char MENU_SNAP_TR_INDICATOR_XBM_DATA[] = {
0xff, 0x03, 0xe1, 0x03, 0xe1, 0x03, 0xe1, 0x03, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0xff, 0x03 };
static unsigned char MENU_SNAP_BL_INDICATOR_XBM_DATA[] = {
0xff, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x1f, 0x02,
0x1f, 0x02, 0x1f, 0x02, 0xff, 0x03 };
static unsigned char MENU_SNAP_BR_INDICATOR_XBM_DATA[] = {
0xff, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xe1, 0x03,
0xe1, 0x03, 0xe1, 0x03, 0xff, 0x03 };
static unsigned char MENU_SNAP_TILED_INDICATOR_XBM_DATA[] = {
0xff, 0x03, 0x1f, 0x02, 0x1f, 0x02, 0x1f, 0x02, 0x1f, 0x02, 0x1f, 0x02,
0xdf, 0x03, 0xdf, 0x03, 0xff, 0x03 };
/* button pixmaps */ /* button pixmaps */
/* the first one is for normal state, the second is for when /* the first one is for normal state, the second is for when
+5 -5
View File
@@ -4,7 +4,7 @@
* *
* Copyright (c) 1997-2003 Alfredo K. Kojima * Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 1998-2003 Dan Pascu * Copyright (c) 1998-2003 Dan Pascu
* Copyright (c) 2014 Window Maker Team * Copyright (c) 2014-2023 Window Maker Team
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@@ -662,13 +662,13 @@ WDefaultEntry optionList[] = {
NULL, getKeybind, setKeyGrab, NULL, NULL}, NULL, getKeybind, setKeyGrab, NULL, NULL},
{"BHMaximizeKey", "None", (void*)WKBD_BHMAXIMIZE, {"BHMaximizeKey", "None", (void*)WKBD_BHMAXIMIZE,
NULL, getKeybind, setKeyGrab, NULL, NULL}, NULL, getKeybind, setKeyGrab, NULL, NULL},
{"LTCMaximizeKey", "None", (void*)WKBD_LTCMAXIMIZE, {"TLCMaximizeKey", "None", (void*)WKBD_LTCMAXIMIZE,
NULL, getKeybind, setKeyGrab, NULL, NULL}, NULL, getKeybind, setKeyGrab, NULL, NULL},
{"RTCMaximizeKey", "None", (void*)WKBD_RTCMAXIMIZE, {"TRCMaximizeKey", "None", (void*)WKBD_RTCMAXIMIZE,
NULL, getKeybind, setKeyGrab, NULL, NULL}, NULL, getKeybind, setKeyGrab, NULL, NULL},
{"LBCMaximizeKey", "None", (void*)WKBD_LBCMAXIMIZE, {"BLCMaximizeKey", "None", (void*)WKBD_LBCMAXIMIZE,
NULL, getKeybind, setKeyGrab, NULL, NULL}, NULL, getKeybind, setKeyGrab, NULL, NULL},
{"RBCMaximizeKey", "None", (void*)WKBD_RBCMAXIMIZE, {"BRCMaximizeKey", "None", (void*)WKBD_RBCMAXIMIZE,
NULL, getKeybind, setKeyGrab, NULL, NULL}, NULL, getKeybind, setKeyGrab, NULL, NULL},
{"MaximusKey", "None", (void*)WKBD_MAXIMUS, {"MaximusKey", "None", (void*)WKBD_MAXIMUS,
NULL, getKeybind, setKeyGrab, NULL, NULL}, NULL, getKeybind, setKeyGrab, NULL, NULL},
+5 -1
View File
@@ -4,7 +4,7 @@
* *
* Copyright (c) 1997-2003 Alfredo K. Kojima * Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 1998-2003 Dan Pascu * Copyright (c) 1998-2003 Dan Pascu
* Copyright (c) 2014 Window Maker Team * Copyright (c) 2014-2023 Window Maker Team
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -1383,6 +1383,10 @@ void wShowInfoPanel(WScreen *scr)
case 32: case 32:
strbuf = wstrappend(strbuf, _("(16 million colors)\n")); strbuf = wstrappend(strbuf, _("(16 million colors)\n"));
break; break;
case 30:
case 40:
strbuf = wstrappend(strbuf, _("(1 billion colors)\n"));
break;
default: default:
snprintf(buffer, sizeof(buffer), _("(%d colors)\n"), 1 << scr->w_depth); snprintf(buffer, sizeof(buffer), _("(%d colors)\n"), 1 << scr->w_depth);
strbuf = wstrappend(strbuf, buffer); strbuf = wstrappend(strbuf, buffer);
+12 -2
View File
@@ -4,6 +4,7 @@
* *
* Copyright (c) 1997-2003 Alfredo K. Kojima * Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 1998-2003 Dan Pascu * Copyright (c) 1998-2003 Dan Pascu
* Copyright (c) 2009-2023 Window Maker Team
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -3038,7 +3039,6 @@ void wDockSwap(WDock *dock)
WAppIcon *btn; WAppIcon *btn;
int x, i; int x, i;
x = getDockXPosition(scr, dock->on_right_side); x = getDockXPosition(scr, dock->on_right_side);
swapDrawers(scr, x); swapDrawers(scr, x);
dock->x_pos = x; dock->x_pos = x;
@@ -4619,7 +4619,10 @@ static void swapDrawer(WDock *drawer, int new_x)
ai = drawer->icon_array[i]; ai = drawer->icon_array[i];
if (ai == NULL) if (ai == NULL)
continue; continue;
ai->xindex *= -1; /* so A B C becomes C B A */ if (drawer->on_right_side)
ai->xindex = -abs(ai->xindex);
else
ai->xindex = abs(ai->xindex);
ai->x_pos = new_x + ai->xindex * ICON_SIZE; ai->x_pos = new_x + ai->xindex * ICON_SIZE;
/* Update drawer's tile */ /* Update drawer's tile */
@@ -4923,6 +4926,13 @@ static WDock * drawerRestoreState(WScreen *scr, WMPropList *drawer_state)
drawer->icon_array[drawer->icon_count] = aicon; drawer->icon_array[drawer->icon_count] = aicon;
if (aicon) { if (aicon) {
/* don't trust the stored direction sign as the dock is
* dynamically positioned depending on the screen size
*/
if (drawer->screen_ptr->dock->on_right_side)
aicon->xindex = -abs(aicon->xindex);
else
aicon->xindex = abs(aicon->xindex);
aicon->dock = drawer; aicon->dock = drawer;
aicon->x_pos = drawer->x_pos + (aicon->xindex * ICON_SIZE); aicon->x_pos = drawer->x_pos + (aicon->xindex * ICON_SIZE);
aicon->y_pos = drawer->y_pos + (aicon->yindex * ICON_SIZE); aicon->y_pos = drawer->y_pos + (aicon->yindex * ICON_SIZE);
+10 -10
View File
@@ -3,7 +3,7 @@
* Window Maker window manager * Window Maker window manager
* *
* Copyright (c) 1997-2003 Alfredo K. Kojima * Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 2014 Window Maker Team * Copyright (c) 2014-2023 Window Maker Team
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -1512,7 +1512,7 @@ static void handleKeyPress(XEvent * event)
CloseWindowMenu(scr); CloseWindowMenu(scr);
handleMaximize(wwin, MAX_HORIZONTAL | MAX_KEYBOARD); handleMaximize(wwin, MAX_HORIZONTAL | MAX_KEYBOARD);
movePionterToWindowCenter(wwin); movePointerToWindowCenter(wwin);
} }
break; break;
case WKBD_LHMAXIMIZE: case WKBD_LHMAXIMIZE:
@@ -1520,7 +1520,7 @@ static void handleKeyPress(XEvent * event)
CloseWindowMenu(scr); CloseWindowMenu(scr);
handleMaximize(wwin, MAX_VERTICAL | MAX_LEFTHALF | MAX_KEYBOARD); handleMaximize(wwin, MAX_VERTICAL | MAX_LEFTHALF | MAX_KEYBOARD);
movePionterToWindowCenter(wwin); movePointerToWindowCenter(wwin);
} }
break; break;
case WKBD_RHMAXIMIZE: case WKBD_RHMAXIMIZE:
@@ -1528,7 +1528,7 @@ static void handleKeyPress(XEvent * event)
CloseWindowMenu(scr); CloseWindowMenu(scr);
handleMaximize(wwin, MAX_VERTICAL | MAX_RIGHTHALF | MAX_KEYBOARD); handleMaximize(wwin, MAX_VERTICAL | MAX_RIGHTHALF | MAX_KEYBOARD);
movePionterToWindowCenter(wwin); movePointerToWindowCenter(wwin);
} }
break; break;
case WKBD_THMAXIMIZE: case WKBD_THMAXIMIZE:
@@ -1536,7 +1536,7 @@ static void handleKeyPress(XEvent * event)
CloseWindowMenu(scr); CloseWindowMenu(scr);
handleMaximize(wwin, MAX_HORIZONTAL | MAX_TOPHALF | MAX_KEYBOARD); handleMaximize(wwin, MAX_HORIZONTAL | MAX_TOPHALF | MAX_KEYBOARD);
movePionterToWindowCenter(wwin); movePointerToWindowCenter(wwin);
} }
break; break;
case WKBD_BHMAXIMIZE: case WKBD_BHMAXIMIZE:
@@ -1544,7 +1544,7 @@ static void handleKeyPress(XEvent * event)
CloseWindowMenu(scr); CloseWindowMenu(scr);
handleMaximize(wwin, MAX_HORIZONTAL | MAX_BOTTOMHALF | MAX_KEYBOARD); handleMaximize(wwin, MAX_HORIZONTAL | MAX_BOTTOMHALF | MAX_KEYBOARD);
movePionterToWindowCenter(wwin); movePointerToWindowCenter(wwin);
} }
break; break;
case WKBD_LTCMAXIMIZE: case WKBD_LTCMAXIMIZE:
@@ -1552,7 +1552,7 @@ static void handleKeyPress(XEvent * event)
CloseWindowMenu(scr); CloseWindowMenu(scr);
handleMaximize(wwin, MAX_LEFTHALF | MAX_TOPHALF | MAX_KEYBOARD); handleMaximize(wwin, MAX_LEFTHALF | MAX_TOPHALF | MAX_KEYBOARD);
movePionterToWindowCenter(wwin); movePointerToWindowCenter(wwin);
} }
break; break;
case WKBD_RTCMAXIMIZE: case WKBD_RTCMAXIMIZE:
@@ -1560,7 +1560,7 @@ static void handleKeyPress(XEvent * event)
CloseWindowMenu(scr); CloseWindowMenu(scr);
handleMaximize(wwin, MAX_RIGHTHALF | MAX_TOPHALF | MAX_KEYBOARD); handleMaximize(wwin, MAX_RIGHTHALF | MAX_TOPHALF | MAX_KEYBOARD);
movePionterToWindowCenter(wwin); movePointerToWindowCenter(wwin);
} }
break; break;
case WKBD_LBCMAXIMIZE: case WKBD_LBCMAXIMIZE:
@@ -1568,7 +1568,7 @@ static void handleKeyPress(XEvent * event)
CloseWindowMenu(scr); CloseWindowMenu(scr);
handleMaximize(wwin, MAX_LEFTHALF | MAX_BOTTOMHALF | MAX_KEYBOARD); handleMaximize(wwin, MAX_LEFTHALF | MAX_BOTTOMHALF | MAX_KEYBOARD);
movePionterToWindowCenter(wwin); movePointerToWindowCenter(wwin);
} }
break; break;
case WKBD_RBCMAXIMIZE: case WKBD_RBCMAXIMIZE:
@@ -1576,7 +1576,7 @@ static void handleKeyPress(XEvent * event)
CloseWindowMenu(scr); CloseWindowMenu(scr);
handleMaximize(wwin, MAX_RIGHTHALF | MAX_BOTTOMHALF | MAX_KEYBOARD); handleMaximize(wwin, MAX_RIGHTHALF | MAX_BOTTOMHALF | MAX_KEYBOARD);
movePionterToWindowCenter(wwin); movePointerToWindowCenter(wwin);
} }
break; break;
case WKBD_MAXIMUS: case WKBD_MAXIMUS:
+1 -1
View File
@@ -2,7 +2,7 @@
* Window Maker window manager * Window Maker window manager
* *
* Copyright (c) 1997-2003 Alfredo K. Kojima * Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 2014 Window Maker Team * Copyright (c) 2014-2023 Window Maker Team
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
+60 -23
View File
@@ -724,9 +724,12 @@ static void paintEntry(WMenu * menu, int index, int selected)
/* draw indicator */ /* draw indicator */
if (entry->flags.indicator && entry->flags.indicator_on) { if (entry->flags.indicator && entry->flags.indicator_on) {
int iw, ih; int iw, ih;
WPixmap *indicator; WPixmap *indicator = NULL;
switch (entry->flags.indicator_type) { switch (entry->flags.indicator_type) {
case MI_DIAMOND:
indicator = scr->menu_radio_indicator;
break;
case MI_CHECK: case MI_CHECK:
indicator = scr->menu_check_indicator; indicator = scr->menu_check_indicator;
break; break;
@@ -739,35 +742,69 @@ static void paintEntry(WMenu * menu, int index, int selected)
case MI_SHADED: case MI_SHADED:
indicator = scr->menu_shade_indicator; indicator = scr->menu_shade_indicator;
break; break;
case MI_DIAMOND: case MI_SNAP_V:
indicator = scr->menu_snap_vertically_indicator;
break;
case MI_SNAP_H:
indicator = scr->menu_snap_horizontally_indicator;
break;
case MI_SNAP_RH:
indicator = scr->menu_snap_rh_indicator;
break;
case MI_SNAP_LH:
indicator = scr->menu_snap_lh_indicator;
break;
case MI_SNAP_TH:
indicator = scr->menu_snap_th_indicator;
break;
case MI_SNAP_BH:
indicator = scr->menu_snap_bh_indicator;
break;
case MI_SNAP_TL:
indicator = scr->menu_snap_tl_indicator;
break;
case MI_SNAP_TR:
indicator = scr->menu_snap_tr_indicator;
break;
case MI_SNAP_BL:
indicator = scr->menu_snap_bl_indicator;
break;
case MI_SNAP_BR:
indicator = scr->menu_snap_br_indicator;
break;
case MI_SNAP_TILED:
indicator = scr->menu_snap_tiled_indicator;
break;
case MI_NONE:
default: default:
indicator = scr->menu_radio_indicator;
break; break;
} }
iw = indicator->width; if (indicator) {
ih = indicator->height; iw = indicator->width;
XSetClipMask(dpy, scr->copy_gc, indicator->mask); ih = indicator->height;
XSetClipOrigin(dpy, scr->copy_gc, 5, y + (h - ih) / 2); XSetClipMask(dpy, scr->copy_gc, indicator->mask);
if (selected) { XSetClipOrigin(dpy, scr->copy_gc, 5, y + (h - ih) / 2);
if (entry->flags.enabled) { if (selected) {
XSetForeground(dpy, scr->copy_gc, WMColorPixel(scr->select_text_color)); if (entry->flags.enabled) {
XSetForeground(dpy, scr->copy_gc, WMColorPixel(scr->select_text_color));
} else {
XSetForeground(dpy, scr->copy_gc, WMColorPixel(scr->dtext_color));
}
} else { } else {
XSetForeground(dpy, scr->copy_gc, WMColorPixel(scr->dtext_color)); if (entry->flags.enabled) {
} XSetForeground(dpy, scr->copy_gc, WMColorPixel(scr->mtext_color));
} else { } else {
if (entry->flags.enabled) { XSetForeground(dpy, scr->copy_gc, WMColorPixel(scr->dtext_color));
XSetForeground(dpy, scr->copy_gc, WMColorPixel(scr->mtext_color)); }
} else {
XSetForeground(dpy, scr->copy_gc, WMColorPixel(scr->dtext_color));
} }
XFillRectangle(dpy, win, scr->copy_gc, 5, y + (h - ih) / 2, iw, ih);
/*
XCopyArea(dpy, indicator->image, win, scr->copy_gc, 0, 0,
iw, ih, 5, y+(h-ih)/2);
*/
XSetClipOrigin(dpy, scr->copy_gc, 0, 0);
} }
XFillRectangle(dpy, win, scr->copy_gc, 5, y + (h - ih) / 2, iw, ih);
/*
XCopyArea(dpy, indicator->image, win, scr->copy_gc, 0, 0,
iw, ih, 5, y+(h-ih)/2);
*/
XSetClipOrigin(dpy, scr->copy_gc, 0, 0);
} }
/* draw right text */ /* draw right text */
+18 -6
View File
@@ -23,11 +23,23 @@
#include "wcore.h" #include "wcore.h"
#define MI_DIAMOND 0 #define MI_NONE 0
#define MI_CHECK 1 #define MI_DIAMOND 1
#define MI_MINIWINDOW 2 #define MI_CHECK 2
#define MI_HIDDEN 3 #define MI_MINIWINDOW 3
#define MI_SHADED 4 #define MI_HIDDEN 4
#define MI_SHADED 5
#define MI_SNAP_V 6
#define MI_SNAP_H 7
#define MI_SNAP_RH 8
#define MI_SNAP_LH 9
#define MI_SNAP_TH 10
#define MI_SNAP_BH 11
#define MI_SNAP_TL 12
#define MI_SNAP_TR 13
#define MI_SNAP_BL 14
#define MI_SNAP_BR 15
#define MI_SNAP_TILED 16
typedef struct WMenuEntry { typedef struct WMenuEntry {
int order; int order;
@@ -44,7 +56,7 @@ typedef struct WMenuEntry {
unsigned int enabled:1; /* entry is selectable */ unsigned int enabled:1; /* entry is selectable */
unsigned int indicator:1; /* left indicator */ unsigned int indicator:1; /* left indicator */
unsigned int indicator_on:1; unsigned int indicator_on:1;
unsigned int indicator_type:3; unsigned int indicator_type:5;
unsigned int editable:1; unsigned int editable:1;
} flags; } flags;
} WMenuEntry; } WMenuEntry;
+1 -1
View File
@@ -2,7 +2,7 @@
* Window Maker window manager * Window Maker window manager
* *
* Copyright (c) 1997-2003 Alfredo K. Kojima * Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 2013 Window Maker Team * Copyright (c) 2013-2023 Window Maker Team
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -3,7 +3,7 @@
* Window Maker window manager * Window Maker window manager
* *
* Copyright (c) 1997-2003 Alfredo K. Kojima * Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 2013 Window Maker Team * Copyright (c) 2013-2016 Window Maker Team
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -4,7 +4,7 @@
* *
* Copyright (c) 1997-2003 Alfredo K. Kojima * Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 1998-2003 Dan Pascu * Copyright (c) 1998-2003 Dan Pascu
* Copyright (c) 2014 Window Maker Team * Copyright (c) 2014-2023 Window Maker Team
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
+28 -40
View File
@@ -484,45 +484,33 @@ static void createPixmaps(WScreen * scr)
WPixmap *pix; WPixmap *pix;
/* load pixmaps */ /* load pixmaps */
pix = wPixmapCreateFromXBMData(scr, (char *)MENU_RADIO_INDICATOR_XBM_DATA, #define LOADPIXMAPINDICATOR(XBM,W,I) {\
(char *)MENU_RADIO_INDICATOR_XBM_DATA, pix = wPixmapCreateFromXBMData(scr, (char *)XBM, (char *)XBM,\
MENU_RADIO_INDICATOR_XBM_SIZE, W, MENU_SNAP_INDICATOR_H_XBM_SIZE,\
MENU_RADIO_INDICATOR_XBM_SIZE, scr->black_pixel, scr->white_pixel); scr->black_pixel, scr->white_pixel);\
if (pix != NULL) if (pix != NULL)\
pix->shared = 1; pix->shared = 1;\
scr->menu_radio_indicator = pix; scr->I = pix;}
pix = wPixmapCreateFromXBMData(scr, (char *)MENU_CHECK_INDICATOR_XBM_DATA, LOADPIXMAPINDICATOR(MENU_RADIO_INDICATOR_XBM_DATA, MENU_RADIO_INDICATOR_XBM_SIZE, menu_radio_indicator)
(char *)MENU_CHECK_INDICATOR_XBM_DATA, LOADPIXMAPINDICATOR(MENU_CHECK_INDICATOR_XBM_DATA, MENU_CHECK_INDICATOR_XBM_SIZE, menu_check_indicator)
MENU_CHECK_INDICATOR_XBM_SIZE, LOADPIXMAPINDICATOR(MENU_MINI_INDICATOR_XBM_DATA, MENU_MINI_INDICATOR_XBM_SIZE, menu_mini_indicator)
MENU_CHECK_INDICATOR_XBM_SIZE, scr->black_pixel, scr->white_pixel); LOADPIXMAPINDICATOR(MENU_HIDE_INDICATOR_XBM_DATA, MENU_HIDE_INDICATOR_XBM_SIZE, menu_hide_indicator)
if (pix != NULL) LOADPIXMAPINDICATOR(MENU_SHADE_INDICATOR_XBM_DATA, MENU_SHADE_INDICATOR_XBM_SIZE, menu_shade_indicator)
pix->shared = 1;
scr->menu_check_indicator = pix;
pix = wPixmapCreateFromXBMData(scr, (char *)MENU_MINI_INDICATOR_XBM_DATA, LOADPIXMAPINDICATOR(MENU_SNAP_V_INDICATOR_XBM_DATA, MENU_SNAP_INDICATOR_W_XBM_SIZE, menu_snap_vertically_indicator)
(char *)MENU_MINI_INDICATOR_XBM_DATA, LOADPIXMAPINDICATOR(MENU_SNAP_H_INDICATOR_XBM_DATA, MENU_SNAP_INDICATOR_W_XBM_SIZE, menu_snap_horizontally_indicator)
MENU_MINI_INDICATOR_XBM_SIZE, LOADPIXMAPINDICATOR(MENU_SNAP_RH_INDICATOR_XBM_DATA, MENU_SNAP_INDICATOR_W_XBM_SIZE, menu_snap_rh_indicator)
MENU_MINI_INDICATOR_XBM_SIZE, scr->black_pixel, scr->white_pixel); LOADPIXMAPINDICATOR(MENU_SNAP_LH_INDICATOR_XBM_DATA, MENU_SNAP_INDICATOR_W_XBM_SIZE, menu_snap_lh_indicator)
if (pix != NULL) LOADPIXMAPINDICATOR(MENU_SNAP_TH_INDICATOR_XBM_DATA, MENU_SNAP_INDICATOR_W_XBM_SIZE, menu_snap_th_indicator)
pix->shared = 1; LOADPIXMAPINDICATOR(MENU_SNAP_BH_INDICATOR_XBM_DATA, MENU_SNAP_INDICATOR_W_XBM_SIZE, menu_snap_bh_indicator)
scr->menu_mini_indicator = pix; LOADPIXMAPINDICATOR(MENU_SNAP_TL_INDICATOR_XBM_DATA, MENU_SNAP_INDICATOR_W_XBM_SIZE, menu_snap_tl_indicator)
LOADPIXMAPINDICATOR(MENU_SNAP_TR_INDICATOR_XBM_DATA, MENU_SNAP_INDICATOR_W_XBM_SIZE, menu_snap_tr_indicator)
LOADPIXMAPINDICATOR(MENU_SNAP_BL_INDICATOR_XBM_DATA, MENU_SNAP_INDICATOR_W_XBM_SIZE, menu_snap_bl_indicator)
LOADPIXMAPINDICATOR(MENU_SNAP_BR_INDICATOR_XBM_DATA, MENU_SNAP_INDICATOR_W_XBM_SIZE, menu_snap_br_indicator)
LOADPIXMAPINDICATOR(MENU_SNAP_TILED_INDICATOR_XBM_DATA, MENU_SNAP_INDICATOR_W_XBM_SIZE, menu_snap_tiled_indicator)
pix = wPixmapCreateFromXBMData(scr, (char *)MENU_HIDE_INDICATOR_XBM_DATA, #undef LOADPIXMAPINDICATOR
(char *)MENU_HIDE_INDICATOR_XBM_DATA,
MENU_HIDE_INDICATOR_XBM_SIZE,
MENU_HIDE_INDICATOR_XBM_SIZE, scr->black_pixel, scr->white_pixel);
if (pix != NULL)
pix->shared = 1;
scr->menu_hide_indicator = pix;
pix = wPixmapCreateFromXBMData(scr, (char *)MENU_SHADE_INDICATOR_XBM_DATA,
(char *)MENU_SHADE_INDICATOR_XBM_DATA,
MENU_SHADE_INDICATOR_XBM_SIZE,
MENU_SHADE_INDICATOR_XBM_SIZE, scr->black_pixel, scr->white_pixel);
if (pix != NULL)
pix->shared = 1;
scr->menu_shade_indicator = pix;
create_logo_image(scr); create_logo_image(scr);
@@ -1304,8 +1292,11 @@ void ScreenCapture(WScreen *scr, int mode)
} }
switch (mode) { switch (mode) {
WWindow *wwin;
XImage *pimg;
case PRINT_WINDOW: case PRINT_WINDOW:
WWindow *wwin = scr->focused_window; wwin = scr->focused_window;
if (wwin && !wwin->flags.shaded) { if (wwin && !wwin->flags.shaded) {
/* /*
* check if hint WM_TAKE_FOCUS is set, if it's the case * check if hint WM_TAKE_FOCUS is set, if it's the case
@@ -1316,7 +1307,6 @@ void ScreenCapture(WScreen *scr, int mode)
} }
else { else {
/* we will only capture the visible window part */ /* we will only capture the visible window part */
XImage *pimg;
int x_crop = 0; int x_crop = 0;
int y_crop = 0; int y_crop = 0;
int w_crop = wwin->client.width; int w_crop = wwin->client.width;
@@ -1345,8 +1335,6 @@ void ScreenCapture(WScreen *scr, int mode)
} }
break; break;
case PRINT_PARTIAL: case PRINT_PARTIAL:
XImage *pimg;
pimg = imageCaptureArea(scr); pimg = imageCaptureArea(scr);
if (pimg) { if (pimg) {
img = RCreateImageFromXImage(scr->rcontext, pimg, None); img = RCreateImageFromXImage(scr->rcontext, pimg, None);
+12
View File
@@ -214,6 +214,18 @@ typedef struct _WScreen {
struct WPixmap *menu_mini_indicator; /* for miniwindow */ struct WPixmap *menu_mini_indicator; /* for miniwindow */
struct WPixmap *menu_hide_indicator; /* for hidden window */ struct WPixmap *menu_hide_indicator; /* for hidden window */
struct WPixmap *menu_shade_indicator; /* for shaded window */ struct WPixmap *menu_shade_indicator; /* for shaded window */
struct WPixmap *menu_snap_vertically_indicator; /* for vertically snap window */
struct WPixmap *menu_snap_horizontally_indicator; /* for horizontally snap window */
struct WPixmap *menu_snap_rh_indicator; /* for righ half snap window */
struct WPixmap *menu_snap_lh_indicator; /* for left half snap window */
struct WPixmap *menu_snap_th_indicator; /* for top half snap window */
struct WPixmap *menu_snap_bh_indicator; /* for bottom half snap window */
struct WPixmap *menu_snap_tl_indicator; /* for top left snap window */
struct WPixmap *menu_snap_tr_indicator; /* for top rigt snap window */
struct WPixmap *menu_snap_bl_indicator; /* for bottom left snap window */
struct WPixmap *menu_snap_br_indicator; /* for bottom right snap window */
struct WPixmap *menu_snap_tiled_indicator; /* for tiled window */
int app_menu_x, app_menu_y; /* position for application menus */ int app_menu_x, app_menu_y; /* position for application menus */
struct WMenu *root_menu; /* root window menu */ struct WMenu *root_menu; /* root window menu */
+34 -33
View File
@@ -3,6 +3,7 @@
* Window Maker window manager * Window Maker window manager
* *
* Copyright (c) 1997-2003 Alfredo K. Kojima * Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 2008-2023 Window Maker Team
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -1900,25 +1901,20 @@ void wWindowConstrainSize(WWindow *wwin, unsigned int *nwidth, unsigned int *nhe
int baseW = 0; int baseW = 0;
int baseH = 0; int baseH = 0;
/*
* X11 proto defines width and height as a CARD16
* if window size is guaranteed to fail, failsafe to a reasonable size
*/
if (width > USHRT_MAX && height > USHRT_MAX) {
width = 640;
height = 480;
return;
}
if (wwin->normal_hints) { if (wwin->normal_hints) {
if (!wwin->flags.maximized) { if (!wwin->flags.maximized) {
winc = wwin->normal_hints->width_inc; winc = wwin->normal_hints->width_inc;
hinc = wwin->normal_hints->height_inc; hinc = wwin->normal_hints->height_inc;
} }
minW = wwin->normal_hints->min_width; if (wwin->normal_hints->min_width > minW)
minH = wwin->normal_hints->min_height; minW = wwin->normal_hints->min_width;
maxW = wwin->normal_hints->max_width; if (wwin->normal_hints->min_height > minH)
maxH = wwin->normal_hints->max_height; minH = wwin->normal_hints->min_height;
if (wwin->normal_hints->max_width < maxW)
maxW = wwin->normal_hints->max_width;
if (wwin->normal_hints->max_height < maxH)
maxH = wwin->normal_hints->max_height;
if (wwin->normal_hints->flags & PAspect) { if (wwin->normal_hints->flags & PAspect) {
minAX = wwin->normal_hints->min_aspect.x; minAX = wwin->normal_hints->min_aspect.x;
minAY = wwin->normal_hints->min_aspect.y; minAY = wwin->normal_hints->min_aspect.y;
@@ -1937,11 +1933,14 @@ void wWindowConstrainSize(WWindow *wwin, unsigned int *nwidth, unsigned int *nhe
height = minH; height = minH;
/* if only one dimension is over the top, set a default 4/3 ratio */ /* if only one dimension is over the top, set a default 4/3 ratio */
if (width > maxW && height < maxH) { if (width > maxW && height < maxH)
width = height * 4 / 3; width = height * 4 / 3;
} else { else if(height > maxH && width < maxW)
if(height > maxH && width < maxW) height = width * 3 / 4;
height = width * 3 / 4; else if(width > maxW && height > maxH) {
/* if both are over the top, set size to almost fullscreen */
height = wwin->screen_ptr->scr_height - 2 * wPreferences.icon_size;
width = wwin->screen_ptr->scr_width - 2 * wPreferences.icon_size;
} }
/* aspect ratio code borrowed from olwm */ /* aspect ratio code borrowed from olwm */
@@ -2149,12 +2148,6 @@ void wWindowConfigure(WWindow *wwin, int req_x, int req_y, int req_width, int re
int resize; int resize;
resize = (req_width != wwin->client.width || req_height != wwin->client.height); resize = (req_width != wwin->client.width || req_height != wwin->client.height);
/*
* if the window is being moved but not resized then
* send a synthetic ConfigureNotify
*/
if ((req_x != wwin->frame_x || req_y != wwin->frame_y) && !resize)
synth_notify = True;
if (WFLAGP(wwin, dont_move_off)) if (WFLAGP(wwin, dont_move_off))
wScreenBringInside(wwin->screen_ptr, &req_x, &req_y, req_width, req_height); wScreenBringInside(wwin->screen_ptr, &req_x, &req_y, req_width, req_height);
@@ -2191,10 +2184,17 @@ void wWindowConfigure(WWindow *wwin, int req_x, int req_y, int req_width, int re
wwin->client.width = req_width; wwin->client.width = req_width;
wwin->client.height = req_height; wwin->client.height = req_height;
} else { } else {
wwin->client.x = req_x; if (req_x != wwin->frame_x || req_y != wwin->frame_y) {
wwin->client.y = req_y + wwin->frame->top_width; wwin->client.x = req_x;
wwin->client.y = req_y + wwin->frame->top_width;
XMoveWindow(dpy, wwin->frame->core->window, req_x, req_y); XMoveWindow(dpy, wwin->frame->core->window, req_x, req_y);
}
/*
* if the window is being moved but not resized
* or if we change nothing then
* send a synthetic ConfigureNotify
*/
synth_notify = True;
} }
wwin->frame_x = req_x; wwin->frame_x = req_x;
wwin->frame_y = req_y; wwin->frame_y = req_y;
@@ -2913,17 +2913,18 @@ static void titlebarDblClick(WCoreWindow *sender, void *data, XEvent *event)
} }
} }
if (wPreferences.double_click_fullscreen){ if (wPreferences.double_click_fullscreen) {
int dir = 0; int dir = 0;
if (event->xbutton.state == 0) { if (event->xbutton.state == 0) {
/* maximize window full screen*/ /* maximize window full screen*/
dir |= (MAX_VERTICAL|MAX_HORIZONTAL); dir |= (MAX_VERTICAL|MAX_HORIZONTAL);
int ndir = dir ^ wwin->flags.maximized; int ndir = dir ^ wwin->flags.maximized;
if (ndir != 0)
wMaximizeWindow(wwin, ndir, wGetHeadForWindow(wwin)); wMaximizeWindow(wwin, ndir, wGetHeadForWindow(wwin));
else
} wUnmaximizeWindow(wwin);
}
} else { } else {
int dir = 0; int dir = 0;
+18 -13
View File
@@ -119,21 +119,22 @@ static const char *const menu_options_entries[] = {
* Defines the menu entries for the Other maximization sub-menu * Defines the menu entries for the Other maximization sub-menu
*/ */
static const struct { static const struct {
unsigned int indicator;
const char *label; const char *label;
unsigned int shortcut_idx; unsigned int shortcut_idx;
int maxim_direction; int maxim_direction;
} menu_maximize_entries[] = { } menu_maximize_entries[] = {
{ N_("Maximize vertically"), WKBD_VMAXIMIZE, MAX_VERTICAL }, { MI_SNAP_V, N_("Vertically"), WKBD_VMAXIMIZE, MAX_VERTICAL },
{ N_("Maximize horizontally"), WKBD_HMAXIMIZE, MAX_HORIZONTAL }, { MI_SNAP_H, N_("Horizontally"), WKBD_HMAXIMIZE, MAX_HORIZONTAL },
{ N_("Maximize left half"), WKBD_LHMAXIMIZE, MAX_VERTICAL | MAX_LEFTHALF }, { MI_SNAP_LH, N_("Left half"), WKBD_LHMAXIMIZE, MAX_VERTICAL | MAX_LEFTHALF },
{ N_("Maximize right half"), WKBD_RHMAXIMIZE, MAX_VERTICAL | MAX_RIGHTHALF }, { MI_SNAP_RH, N_("Right half"), WKBD_RHMAXIMIZE, MAX_VERTICAL | MAX_RIGHTHALF },
{ N_("Maximize top half"), WKBD_THMAXIMIZE, MAX_HORIZONTAL | MAX_TOPHALF }, { MI_SNAP_TH, N_("Top half"), WKBD_THMAXIMIZE, MAX_HORIZONTAL | MAX_TOPHALF },
{ N_("Maximize bottom half"), WKBD_BHMAXIMIZE, MAX_HORIZONTAL | MAX_BOTTOMHALF }, { MI_SNAP_BH, N_("Bottom half"), WKBD_BHMAXIMIZE, MAX_HORIZONTAL | MAX_BOTTOMHALF },
{ N_("Maximize left top corner"), WKBD_LTCMAXIMIZE, MAX_LEFTHALF | MAX_TOPHALF }, { MI_SNAP_TL, N_("Top left"), WKBD_LTCMAXIMIZE, MAX_LEFTHALF | MAX_TOPHALF },
{ N_("Maximize right top corner"), WKBD_RTCMAXIMIZE, MAX_RIGHTHALF | MAX_TOPHALF }, { MI_SNAP_TR, N_("Top right"), WKBD_RTCMAXIMIZE, MAX_RIGHTHALF | MAX_TOPHALF },
{ N_("Maximize left bottom corner"), WKBD_LBCMAXIMIZE, MAX_LEFTHALF | MAX_BOTTOMHALF }, { MI_SNAP_BL, N_("Bottom left"), WKBD_LBCMAXIMIZE, MAX_LEFTHALF | MAX_BOTTOMHALF },
{ N_("Maximize right bottom corner"), WKBD_RBCMAXIMIZE, MAX_RIGHTHALF | MAX_BOTTOMHALF }, { MI_SNAP_BR, N_("Bottom right"), WKBD_RBCMAXIMIZE, MAX_RIGHTHALF | MAX_BOTTOMHALF },
{ N_("Maximus: tiled maximization"), WKBD_MAXIMUS, MAX_MAXIMUS } { MI_SNAP_TILED, N_("Tiled"), WKBD_MAXIMUS, MAX_MAXIMUS }
}; };
static void updateOptionsMenu(WMenu * menu, WWindow * wwin); static void updateOptionsMenu(WMenu * menu, WWindow * wwin);
@@ -562,6 +563,7 @@ static WMenu *makeOptionsMenu(WScreen * scr)
static WMenu *makeMaximizeMenu(WScreen * scr) static WMenu *makeMaximizeMenu(WScreen * scr)
{ {
WMenu *menu; WMenu *menu;
WMenuEntry *entry;
int i; int i;
menu = wMenuCreate(scr, NULL, False); menu = wMenuCreate(scr, NULL, False);
@@ -570,8 +572,11 @@ static WMenu *makeMaximizeMenu(WScreen * scr)
return NULL; return NULL;
} }
for (i = 0; i < wlengthof(menu_maximize_entries); i++) for (i = 0; i < wlengthof(menu_maximize_entries); i++) {
wMenuAddCallback(menu, _(menu_maximize_entries[i].label), execMaximizeCommand, NULL); entry = wMenuAddCallback(menu, _(menu_maximize_entries[i].label), execMaximizeCommand, NULL);
entry->flags.indicator = entry->flags.indicator_on = 1;
entry->flags.indicator_type = menu_maximize_entries[i].indicator;
}
return menu; return menu;
} }
+31 -5
View File
@@ -2,7 +2,7 @@
* *
* Window Maker window manager * Window Maker window manager
* *
* Copyright (c) 2014 Window Maker Team - David Maciejak * Copyright (c) 2014-2023 Window Maker Team - David Maciejak
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -256,7 +256,7 @@ static WMPixmap *dummy_background_pixmap(WWorkspaceMap *wsmap)
RImage *img; RImage *img;
WMPixmap *icon; WMPixmap *icon;
img = RCreateImage(wsmap->wswidth, wsmap->wsheight, 0); img = RCreateImage(wsmap->mini_workspace_width, wsmap->mini_workspace_height, 0);
if (!img) if (!img)
return NULL; return NULL;
@@ -327,7 +327,7 @@ static void hide_mini_workspace(W_WorkspaceMap *wsmap_array, int i)
static WMPixmap *get_mini_workspace(WWorkspaceMap *wsmap, int index) static WMPixmap *get_mini_workspace(WWorkspaceMap *wsmap, int index)
{ {
if (!wsmap->scr->workspaces[index]->map) if (!wsmap->scr->workspaces[index]->map)
return dummy_background_pixmap(wsmap); return NULL;
if (index == wsmap->scr->current_workspace) if (index == wsmap->scr->current_workspace)
return enlight_workspace(wsmap->scr, wsmap->scr->workspaces[index]->map); return enlight_workspace(wsmap->scr, wsmap->scr->workspaces[index]->map);
@@ -486,12 +486,15 @@ static void handle_event(WWorkspaceMap *wsmap, W_WorkspaceMap *wsmap_array)
w_global.process_workspacemap_event = True; w_global.process_workspacemap_event = True;
while (w_global.process_workspacemap_event) { while (w_global.process_workspacemap_event) {
WMMaskEvent(dpy, KeyPressMask | KeyReleaseMask | ExposureMask WMMaskEvent(dpy, KeyPressMask | KeyReleaseMask | ExposureMask | PointerMotionMask |
| PointerMotionMask | ButtonPressMask | ButtonReleaseMask | EnterWindowMask, &ev); ButtonPressMask | ButtonReleaseMask | EnterWindowMask | FocusChangeMask, &ev);
modifiers = ev.xkey.state & w_global.shortcut.modifiers_mask; modifiers = ev.xkey.state & w_global.shortcut.modifiers_mask;
switch (ev.type) { switch (ev.type) {
WMScreen *wmscr;
WMColor *black;
case KeyPress: case KeyPress:
if (ev.xkey.keycode == escKey || (wKeyBindings[WKBD_WORKSPACEMAP].keycode != 0 && if (ev.xkey.keycode == escKey || (wKeyBindings[WKBD_WORKSPACEMAP].keycode != 0 &&
wKeyBindings[WKBD_WORKSPACEMAP].keycode == ev.xkey.keycode && wKeyBindings[WKBD_WORKSPACEMAP].keycode == ev.xkey.keycode &&
@@ -530,6 +533,29 @@ static void handle_event(WWorkspaceMap *wsmap, W_WorkspaceMap *wsmap_array)
} }
break; break;
case FocusIn:
wmscr = wsmap->scr->wmscreen;
black = WMBlackColor(wmscr);
const char *text = "?";
WMFont *bold = WMBoldSystemFontOfSize(wmscr, wsmap->mini_workspace_width / 3);
int x = (wsmap->mini_workspace_width / 2) - (WMWidthOfString(bold, text, strlen(text)) / 2);
int y = (wsmap->mini_workspace_height / 2) - (WMFontHeight(bold) / 2);
WMPixmap *icon = dummy_background_pixmap(wsmap);
if (icon) {
int i;
WMDrawString(wmscr, WMGetPixmapXID(icon),
black, bold, x, y, text, strlen(text));
for (i = 0; i < wsmap->scr->workspace_count; i++) {
if (!wsmap->scr->workspaces[i]->map)
WMSetButtonImage(wsmap_array[i].workspace_img_button, icon);
}
WMReleasePixmap(icon);
}
WMHandleEvent(&ev);
break;
default: default:
WMHandleEvent(&ev); WMHandleEvent(&ev);
break; break;
+1 -1
View File
@@ -2,7 +2,7 @@
* Window Maker window manager * Window Maker window manager
* *
* Copyright (c) 1997-2003 Alfredo K. Kojima * Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 2014 Window Maker Team * Copyright (c) 2014-2015 Window Maker Team
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
+2 -4
View File
@@ -1,7 +1,7 @@
/* /*
* Window Maker window manager * Window Maker window manager
* *
* Copyright (c) 2014 Window Maker Team - David Maciejak * Copyright (c) 2014-2023 Window Maker Team - David Maciejak
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -63,8 +63,6 @@ RImage *img;
Pixmap pix; Pixmap pix;
const char *APPNAME = "wmiv"; const char *APPNAME = "wmiv";
int APPVERSION_MAJOR = 0;
int APPVERSION_MINOR = 7;
int NEXT = 0; int NEXT = 0;
int PREV = 1; int PREV = 1;
float zoom_factor = 0; float zoom_factor = 0;
@@ -740,7 +738,7 @@ int main(int argc, char **argv)
argv[0]); argv[0]);
return EXIT_SUCCESS; return EXIT_SUCCESS;
case 'v': case 'v':
fprintf(stderr, "%s version %d.%d\n", APPNAME, APPVERSION_MAJOR, APPVERSION_MINOR); printf("%s version %s\n", APPNAME, VERSION);
return EXIT_SUCCESS; return EXIT_SUCCESS;
case '?': case '?':
return EXIT_FAILURE; return EXIT_FAILURE;
+1 -1
View File
@@ -2,7 +2,7 @@
* *
* Raster graphics library * Raster graphics library
* *
* Copyright (c) 2014 Window Maker Team * Copyright (c) 2014-2021 Window Maker Team
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public * modify it under the terms of the GNU Library General Public
+1 -1
View File
@@ -3,7 +3,7 @@
* Raster graphics library * Raster graphics library
* *
* Copyright (c) 1997-2003 Alfredo K. Kojima * Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 2014 Window Maker Team * Copyright (c) 2014-2021 Window Maker Team
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public * modify it under the terms of the GNU Library General Public
+1 -1
View File
@@ -2,7 +2,7 @@
* *
* Raster graphics library * Raster graphics library
* *
* Copyright (c) 2014 Window Maker Team * Copyright (c) 2014-2021 Window Maker Team
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public * modify it under the terms of the GNU Library General Public
+1 -1
View File
@@ -3,7 +3,7 @@
* Raster graphics library * Raster graphics library
* *
* Copyright (c) 1997-2003 Alfredo K. Kojima * Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 2014 Window Maker Team * Copyright (c) 2014-2021 Window Maker Team
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public * modify it under the terms of the GNU Library General Public
+1 -1
View File
@@ -2,7 +2,7 @@
* *
* Raster graphics library * Raster graphics library
* *
* Copyright (c) 2014 Window Maker Team * Copyright (c) 2014-2021 Window Maker Team
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public * modify it under the terms of the GNU Library General Public
+1 -1
View File
@@ -3,7 +3,7 @@
* Raster graphics library * Raster graphics library
* *
* Copyright (c) 1997-2003 Alfredo K. Kojima * Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 2014 Window Maker Team * Copyright (c) 2014-2021 Window Maker Team
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public * modify it under the terms of the GNU Library General Public