MCPcopy Index your code
hub / github.com/material-shell/material-shell / handleWindow

Method handleWindow

src/manager/msWindowManager.ts:763–798  ·  view source on GitHub ↗
(metaWindow: MetaWindowWithMsProperties)

Source from the content-addressed store, hash-verified

761 }
762
763 private handleWindow(metaWindow: MetaWindowWithMsProperties) {
764 if (
765 metaWindow.wm_class !== '' &&
766 getSettings('layouts')!
767 .get_string('windows-excluded')!
768 .split(',')
769 .map((item) => item.trim())
770 .indexOf(metaWindow.wm_class!) > -1
771 ) {
772 return false;
773 }
774 const windowRole = metaWindow.get_role()!;
775 if (
776 windowRole !== '' &&
777 getSettings('layouts')!
778 .get_string('roles-excluded')!
779 .split(',')
780 .map((item) => item.trim())
781 .indexOf(windowRole) !== -1
782 ) {
783 return false;
784 }
785
786 if (metaWindow.above) {
787 metaWindow.stick();
788 return false;
789 }
790 const meta = Meta.WindowType;
791 const types = [
792 meta.NORMAL,
793 meta.DIALOG,
794 meta.MODAL_DIALOG,
795 meta.UTILITY,
796 ];
797 return types.includes(metaWindow.window_type);
798 }
799
800 isMetaWindowDialog(metaWindow: Meta.Window) {
801 const dialogTypes = [

Callers 1

onNewMetaWindowMethod · 0.95

Calls 6

getSettingsFunction · 0.90
stickMethod · 0.80
mapMethod · 0.65
splitMethod · 0.65
get_stringMethod · 0.65
get_roleMethod · 0.65

Tested by

no test coverage detected